mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2: always update avatar if MXC changes
When using direct downloads only the MXC changes but hash stays empty.
This commit is contained in:
parent
6eb4c7b17f
commit
03f7116806
2 changed files with 2 additions and 2 deletions
|
|
@ -162,7 +162,7 @@ func (ghost *Ghost) UpdateAvatar(ctx context.Context, avatar *Avatar) bool {
|
|||
ghost.AvatarSet = false
|
||||
zerolog.Ctx(ctx).Err(err).Msg("Failed to reupload avatar")
|
||||
return true
|
||||
} else if newHash == ghost.AvatarHash && ghost.AvatarSet {
|
||||
} else if newMXC == ghost.AvatarMXC && newHash == ghost.AvatarHash && ghost.AvatarSet {
|
||||
return true
|
||||
}
|
||||
ghost.AvatarHash = newHash
|
||||
|
|
|
|||
|
|
@ -3041,7 +3041,7 @@ func (portal *Portal) updateAvatar(ctx context.Context, avatar *Avatar, sender M
|
|||
portal.AvatarSet = false
|
||||
zerolog.Ctx(ctx).Err(err).Msg("Failed to reupload room avatar")
|
||||
return true
|
||||
} else if newHash == portal.AvatarHash && portal.AvatarSet {
|
||||
} else if newMXC == portal.AvatarMXC && newHash == portal.AvatarHash && portal.AvatarSet {
|
||||
return true
|
||||
}
|
||||
portal.AvatarMXC = newMXC
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue