pin instanceAccountID to in-process emoji

This commit is contained in:
tsmethurst 2022-01-11 17:51:45 +01:00
parent 113f9d9ab4
commit 33ca5513ad

View file

@ -37,6 +37,9 @@
type ProcessingEmoji struct { type ProcessingEmoji struct {
mu sync.Mutex mu sync.Mutex
// id of this instance's account -- pinned for convenience here so we only need to fetch it once
instanceAccountID string
/* /*
below fields should be set on newly created media; below fields should be set on newly created media;
emoji will be updated incrementally as media goes through processing emoji will be updated incrementally as media goes through processing
@ -370,6 +373,7 @@ func (m *manager) preProcessEmoji(ctx context.Context, data DataFunc, shortcode
} }
processingEmoji := &ProcessingEmoji{ processingEmoji := &ProcessingEmoji{
instanceAccountID: instanceAccount.ID,
emoji: emoji, emoji: emoji,
data: data, data: data,
staticState: received, staticState: received,