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/bundb/emoji_test.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/bundb/emoji_test.go')
-rw-r--r-- | internal/db/bundb/emoji_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/db/bundb/emoji_test.go b/internal/db/bundb/emoji_test.go index 3c61fb620..c6577a721 100644 --- a/internal/db/bundb/emoji_test.go +++ b/internal/db/bundb/emoji_test.go @@ -38,6 +38,13 @@ func (suite *EmojiTestSuite) TestGetUseableEmojis() { suite.Equal("rainbow", emojis[0].Shortcode) } +func (suite *EmojiTestSuite) TestGetEmojiByStaticURL() { + emoji, err := suite.db.GetEmojiByStaticURL(context.Background(), "http://localhost:8080/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/emoji/static/01F8MH9H8E4VG3KDYJR9EGPXCQ.png") + suite.NoError(err) + suite.NotNil(emoji) + suite.Equal("rainbow", emoji.Shortcode) +} + func (suite *EmojiTestSuite) TestGetAllEmojis() { emojis, err := suite.db.GetEmojis(context.Background(), db.EmojiAllDomains, true, true, "", "", "", 0) |