From fdce256a03cf206e419d4b41fb0d5192faed28df Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 21 Aug 2023 12:11:56 +0300 Subject: [PATCH] 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. --- user.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user.go b/user.go index 6ecae7a..3ae4263 100644 --- a/user.go +++ b/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)