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()