From 37cca66030c38513b7e33d9ed3b916271aaa8955 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 3 Mar 2025 15:46:35 +0000 Subject: [PATCH] make similar changes for emoji, even if not necessary, just to keep in-sync --- internal/federation/dereferencing/emoji.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/internal/federation/dereferencing/emoji.go b/internal/federation/dereferencing/emoji.go index 1ac27f2b2..0a117f762 100644 --- a/internal/federation/dereferencing/emoji.go +++ b/internal/federation/dereferencing/emoji.go @@ -134,19 +134,23 @@ func (d *Dereferencer) RefreshEmoji( *gtsmodel.Emoji, error, ) { - // Check emoji is up-to-date - // with provided extra info. - switch { - case info.URI != nil && - *info.URI != emoji.URI: + // Check uri up-to-date. + if info.URI != nil && + *info.URI != emoji.URI { emoji.URI = *info.URI force = true - case info.ImageRemoteURL != nil && - *info.ImageRemoteURL != emoji.ImageRemoteURL: + } + + // Check image remote URL up-to-date. + if info.ImageRemoteURL != nil && + *info.ImageRemoteURL != emoji.ImageRemoteURL { emoji.ImageRemoteURL = *info.ImageRemoteURL force = true - case info.ImageStaticRemoteURL != nil && - *info.ImageStaticRemoteURL != emoji.ImageStaticRemoteURL: + } + + // Check image static remote URL up-to-date. + if info.ImageStaticRemoteURL != nil && + *info.ImageStaticRemoteURL != emoji.ImageStaticRemoteURL { emoji.ImageStaticRemoteURL = *info.ImageStaticRemoteURL force = true }