Ignore conversation events where DM turns into group
Google seems to randomly send group chat info with a DM ID, then revert back to the correct DM data in the next update. Since DMs should never turn into groups, just ignore those events entirely.
This commit is contained in:
parent
8140abedd5
commit
fdce256a03
1 changed files with 3 additions and 0 deletions
3
user.go
3
user.go
|
@ -810,6 +810,9 @@ func (user *User) syncConversation(v *gmproto.Conversation, source string) {
|
|||
if v.Participants == nil {
|
||||
log.Debug().Msg("Not syncing conversation with nil participants")
|
||||
return
|
||||
} else if portal.IsPrivateChat() && v.IsGroupChat {
|
||||
log.Warn().Msg("Ignoring group chat update for private chat")
|
||||
return
|
||||
}
|
||||
log.Debug().Msg("Syncing existing portal")
|
||||
portal.UpdateMetadata(user, v)
|
||||
|
|
Loading…
Reference in a new issue