mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 04:27:29 -06:00
[bugfix] fix refreshed additional media info being ignored (#3867)
* fix refreshed additional media info being ignored when force flag already set * also update to always iterate through all additional info fields * make similar changes for emoji, even if not necessary, just to keep in-sync
This commit is contained in:
parent
3cc2b934fa
commit
f5967d0b76
2 changed files with 29 additions and 22 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue