fix new processing media / emoji not being added to dereferencer maps (#3269)

This commit is contained in:
kim 2024-09-03 13:30:41 +00:00 committed by GitHub
parent 7b7659f1fa
commit 6ee540a503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

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

View file

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