[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
This commit is contained in:
tobi 2022-09-06 12:42:55 +02:00 committed by GitHub
commit a872ddebe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 773 additions and 62 deletions

View file

@ -93,7 +93,7 @@ func (p *ProcessingEmoji) LoadEmoji(ctx context.Context) (*gtsmodel.Emoji, error
// store the result in the database before returning it
if !p.insertedInDB {
if err := p.database.Put(ctx, p.emoji); err != nil {
if err := p.database.PutEmoji(ctx, p.emoji); err != nil {
return nil, err
}
p.insertedInDB = true