From a872ddebe67c7b76cbb78667224b393a847834ac Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 6 Sep 2022 12:42:55 +0200 Subject: [feature] Custom emoji updates (serve emoji via s2s api, tune db models) (#805) * migrate emojis * add get emoji to s2s (federation) API * add new emoji db + cache functions * add shortcodeDomain lookup for emojis * check existing emojis w/cache, not w/constraints * go fmt * add putEmoji func * use new db emoji funcs instead of where * remove emojistringstotags func * add unique constraint back in * fix up broken migration * update index --- internal/processing/media/getfile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing/media') diff --git a/internal/processing/media/getfile.go b/internal/processing/media/getfile.go index 52cdcc052..7435a241d 100644 --- a/internal/processing/media/getfile.go +++ b/internal/processing/media/getfile.go @@ -231,8 +231,8 @@ func (p *processor) getEmojiContent(ctx context.Context, wantedEmojiID string, e emojiContent := &apimodel.Content{} var storagePath string - e := >smodel.Emoji{} - if err := p.db.GetByID(ctx, wantedEmojiID, e); err != nil { + e, err := p.db.GetEmojiByID(ctx, wantedEmojiID) + if err != nil { return nil, gtserror.NewErrorNotFound(fmt.Errorf("emoji %s could not be taken from the db: %s", wantedEmojiID, err)) } -- cgit v1.2.3