From 70d65b683fa963d2a8761182a2ddd2f4f9a86bb4 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:16:24 +0200 Subject: [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) --- internal/federation/dereferencing/account_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'internal/federation/dereferencing/account_test.go') diff --git a/internal/federation/dereferencing/account_test.go b/internal/federation/dereferencing/account_test.go index aec612ac8..ddd9456e8 100644 --- a/internal/federation/dereferencing/account_test.go +++ b/internal/federation/dereferencing/account_test.go @@ -224,6 +224,7 @@ func (suite *AccountTestSuite) TestDereferenceRemoteAccountWithPartial() { URI: "http://fossbros-anonymous.io/emoji/01GD5HCC2YECT012TK8PAGX4D1", Shortcode: "kip_van_den_bos", UpdatedAt: testrig.TimeMustParse("2022-09-13T12:13:12+02:00"), + ImageUpdatedAt: testrig.TimeMustParse("2022-09-13T12:13:12+02:00"), ImageRemoteURL: "http://fossbros-anonymous.io/emoji/kip.gif", Disabled: testrig.FalseBool(), VisibleInPicker: testrig.FalseBool(), @@ -275,10 +276,12 @@ func (suite *AccountTestSuite) TestDereferenceRemoteAccountWithPartial2() { { URI: knownEmoji.URI, Shortcode: knownEmoji.Shortcode, - UpdatedAt: knownEmoji.CreatedAt, + UpdatedAt: knownEmoji.UpdatedAt, + ImageUpdatedAt: knownEmoji.ImageUpdatedAt, ImageRemoteURL: knownEmoji.ImageRemoteURL, Disabled: knownEmoji.Disabled, VisibleInPicker: knownEmoji.VisibleInPicker, + Domain: knownEmoji.Domain, }, }, } @@ -326,10 +329,12 @@ func (suite *AccountTestSuite) TestDereferenceRemoteAccountWithPartial3() { { URI: knownEmoji.URI, Shortcode: knownEmoji.Shortcode, - UpdatedAt: knownEmoji.CreatedAt, + UpdatedAt: knownEmoji.UpdatedAt, + ImageUpdatedAt: knownEmoji.ImageUpdatedAt, ImageRemoteURL: knownEmoji.ImageRemoteURL, Disabled: knownEmoji.Disabled, VisibleInPicker: knownEmoji.VisibleInPicker, + Domain: knownEmoji.Domain, }, }, } @@ -372,6 +377,7 @@ func (suite *AccountTestSuite) TestDereferenceRemoteAccountWithPartial3() { URI: "http://fossbros-anonymous.io/emoji/01GD5HCC2YECT012TK8PAGX4D1", Shortcode: "kip_van_den_bos", UpdatedAt: testrig.TimeMustParse("2022-09-13T12:13:12+02:00"), + ImageUpdatedAt: testrig.TimeMustParse("2022-09-13T12:13:12+02:00"), ImageRemoteURL: "http://fossbros-anonymous.io/emoji/kip.gif", Disabled: testrig.FalseBool(), VisibleInPicker: testrig.FalseBool(), -- cgit v1.2.3