diff options
| author | 2022-01-11 17:51:45 +0100 | |
|---|---|---|
| committer | 2022-01-11 17:51:45 +0100 | |
| commit | 33ca5513ada0e21c41e6fe13866b4f5ae961f670 (patch) | |
| tree | 31b455c89d0645f5697d7bce718b8260cece90b3 /internal/media | |
| parent | pass a function into the manager, start work on emoji (diff) | |
| download | gotosocial-33ca5513ada0e21c41e6fe13866b4f5ae961f670.tar.xz | |
pin instanceAccountID to in-process emoji
Diffstat (limited to 'internal/media')
| -rw-r--r-- | internal/media/processingemoji.go | 16 | 
1 files changed, 10 insertions, 6 deletions
| diff --git a/internal/media/processingemoji.go b/internal/media/processingemoji.go index 7e2d4f31f..41754830f 100644 --- a/internal/media/processingemoji.go +++ b/internal/media/processingemoji.go @@ -37,6 +37,9 @@ import (  type ProcessingEmoji struct {  	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;  		emoji will be updated incrementally as media goes through processing @@ -370,12 +373,13 @@ func (m *manager) preProcessEmoji(ctx context.Context, data DataFunc, shortcode  	}  	processingEmoji := &ProcessingEmoji{ -		emoji:         emoji, -		data:          data, -		staticState:   received, -		fullSizeState: received, -		database:      m.db, -		storage:       m.storage, +		instanceAccountID: instanceAccount.ID, +		emoji:             emoji, +		data:              data, +		staticState:       received, +		fullSizeState:     received, +		database:          m.db, +		storage:           m.storage,  	}  	return processingEmoji, nil | 
