mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 17:33:48 +01:00
Ignore picture commands if chat meta sync is disabled
We get the same data from the message log
This commit is contained in:
parent
2188dc7701
commit
394da69a69
2 changed files with 2 additions and 2 deletions
|
@ -414,7 +414,7 @@ func (portal *Portal) SyncParticipants(metadata *whatsappExt.GroupInfo) {
|
|||
}
|
||||
|
||||
func (portal *Portal) UpdateAvatar(user *User, avatar *whatsappExt.ProfilePicInfo, updateInfo bool) bool {
|
||||
if avatar == nil {
|
||||
if avatar == nil || (avatar.Status == 0 && avatar.Tag != "remove" && len(avatar.URL) == 0) {
|
||||
var err error
|
||||
avatar, err = user.Conn.GetProfilePicThumb(portal.Key.JID)
|
||||
if err != nil {
|
||||
|
|
2
user.go
2
user.go
|
@ -1090,7 +1090,7 @@ func (user *User) HandleCommand(cmd whatsappExt.Command) {
|
|||
if strings.HasSuffix(cmd.JID, whatsappExt.NewUserSuffix) {
|
||||
puppet := user.bridge.GetPuppetByJID(cmd.JID)
|
||||
go puppet.UpdateAvatar(user, cmd.ProfilePicInfo)
|
||||
} else {
|
||||
} else if user.bridge.Config.Bridge.ChatMetaSync {
|
||||
portal := user.GetPortalByJID(cmd.JID)
|
||||
go portal.UpdateAvatar(user, cmd.ProfilePicInfo, true)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue