diff options
author | 2022-10-13 15:16:24 +0200 | |
---|---|---|
committer | 2022-10-13 15:16:24 +0200 | |
commit | 70d65b683fa963d2a8761182a2ddd2f4f9a86bb4 (patch) | |
tree | 9cbd8f6870569b2514683c0e8ff6ea32e6e81780 /internal/db/emoji.go | |
parent | [frontend] Use new GET custom_emoji admin api (#908) (diff) | |
download | gotosocial-70d65b683fa963d2a8761182a2ddd2f4f9a86bb4.tar.xz |
[feature] Refetch emojis when they change on remote instances (#905)
* select emoji using image_static_url
* use updated on AP emojis
* allow refetch of updated emojis
* cheeky workaround for test
* clean up old files for refreshed emoji
* check error for originalPostData
* shorten GetEmojiByStaticImageURL
* delete kirby (sorry nintendo)
Diffstat (limited to 'internal/db/emoji.go')
-rw-r--r-- | internal/db/emoji.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/db/emoji.go b/internal/db/emoji.go index 4316a43ef..831629232 100644 --- a/internal/db/emoji.go +++ b/internal/db/emoji.go @@ -32,6 +32,9 @@ const EmojiAllDomains string = "all" type Emoji interface { // PutEmoji puts one emoji in the database. PutEmoji(ctx context.Context, emoji *gtsmodel.Emoji) Error + // UpdateEmoji updates the given columns of one emoji. + // If no columns are specified, every column is updated. + UpdateEmoji(ctx context.Context, emoji *gtsmodel.Emoji, columns ...string) (*gtsmodel.Emoji, Error) // GetUseableEmojis gets all emojis which are useable by accounts on this instance. GetUseableEmojis(ctx context.Context) ([]*gtsmodel.Emoji, Error) // GetEmojis gets emojis based on given parameters. Useful for admin actions. @@ -43,4 +46,6 @@ type Emoji interface { GetEmojiByShortcodeDomain(ctx context.Context, shortcode string, domain string) (*gtsmodel.Emoji, Error) // GetEmojiByURI returns one emoji based on its ActivityPub URI. GetEmojiByURI(ctx context.Context, uri string) (*gtsmodel.Emoji, Error) + // GetEmojiByStaticURL gets an emoji using the URL of the static version of the emoji image. + GetEmojiByStaticURL(ctx context.Context, imageStaticURL string) (*gtsmodel.Emoji, Error) } |