summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-10-13 15:16:24 +0200
committerLibravatar GitHub <noreply@github.com>2022-10-13 15:16:24 +0200
commit70d65b683fa963d2a8761182a2ddd2f4f9a86bb4 (patch)
tree9cbd8f6870569b2514683c0e8ff6ea32e6e81780 /internal/api
parent[frontend] Use new GET custom_emoji admin api (#908) (diff)
downloadgotosocial-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/api')
-rw-r--r--internal/api/s2s/user/inboxpost_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/api/s2s/user/inboxpost_test.go b/internal/api/s2s/user/inboxpost_test.go
index a408b3773..364ad336f 100644
--- a/internal/api/s2s/user/inboxpost_test.go
+++ b/internal/api/s2s/user/inboxpost_test.go
@@ -239,7 +239,13 @@ func (suite *InboxPostTestSuite) TestPostUnblock() {
func (suite *InboxPostTestSuite) TestPostUpdate() {
updatedAccount := *suite.testAccounts["remote_account_1"]
updatedAccount.DisplayName = "updated display name!"
- testEmoji := testrig.NewTestEmojis()["rainbow"]
+
+ // ad an emoji to the account; because we're serializing this remote
+ // account from our own instance, we need to cheat a bit to get the emoji
+ // to work properly, just for this test
+ testEmoji := &gtsmodel.Emoji{}
+ *testEmoji = *testrig.NewTestEmojis()["yell"]
+ testEmoji.ImageURL = testEmoji.ImageRemoteURL // <- here's the cheat
updatedAccount.Emojis = []*gtsmodel.Emoji{testEmoji}
asAccount, err := suite.tc.AccountToAS(context.Background(), &updatedAccount)