summaryrefslogtreecommitdiff
path: root/internal/processing/media/getfile.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-09-06 12:42:55 +0200
committerLibravatar GitHub <noreply@github.com>2022-09-06 12:42:55 +0200
commita872ddebe67c7b76cbb78667224b393a847834ac (patch)
tree28b7d0081ee12ab9928eff0aecd6b55d32d8228d /internal/processing/media/getfile.go
parent[bugfix] Catch json syntax errors in the frontend + display a more helpful me... (diff)
downloadgotosocial-a872ddebe67c7b76cbb78667224b393a847834ac.tar.xz
[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
Diffstat (limited to 'internal/processing/media/getfile.go')
-rw-r--r--internal/processing/media/getfile.go4
1 files changed, 2 insertions, 2 deletions
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 := &gtsmodel.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))
}