From 6ee540a503f4896fdd7ca087ab997348e6e00998 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:30:41 +0000 Subject: [PATCH] fix new processing media / emoji not being added to dereferencer maps (#3269) --- internal/federation/dereferencing/emoji.go | 3 +++ internal/federation/dereferencing/media.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/internal/federation/dereferencing/emoji.go b/internal/federation/dereferencing/emoji.go index 3174fa2f9..12c648556 100644 --- a/internal/federation/dereferencing/emoji.go +++ b/internal/federation/dereferencing/emoji.go @@ -303,6 +303,9 @@ func (d *Dereferencer) processEmojiSafely( return nil, err } + // Add processing emoji media to hash map. + d.derefEmojis[shortcodeDomain] = processing + defer func() { // Remove on finish. d.derefEmojisMu.Lock() diff --git a/internal/federation/dereferencing/media.go b/internal/federation/dereferencing/media.go index d4f583735..859e5603f 100644 --- a/internal/federation/dereferencing/media.go +++ b/internal/federation/dereferencing/media.go @@ -244,6 +244,9 @@ func (d *Dereferencer) processMediaSafeley( return nil, err } + // Add processing media to hash map. + d.derefMedia[remoteURL] = processing + defer func() { // Remove on finish. d.derefMediaMu.Lock()