mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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)
This commit is contained in:
@ -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 := >smodel.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)
|
||||
|
Reference in New Issue
Block a user