Ignore downloading messages moving away from groups

This commit is contained in:
Tulir Asokan 2023-08-21 10:58:34 +03:00
parent fd154bd633
commit 667613f0c5

View file

@ -428,6 +428,10 @@ func (portal *Portal) handleExistingMessageUpdate(ctx context.Context, source *U
} }
if chatIDChanged { if chatIDChanged {
log = log.With().Str("old_chat_id", dbMsg.Chat.ID).Logger() log = log.With().Str("old_chat_id", dbMsg.Chat.ID).Logger()
if downloadPendingStatusMessage(newStatus) != "" && !portal.IsPrivateChat() {
log.Debug().Msg("Ignoring chat ID change from group chat as update is a pending download")
return
}
log.Debug(). log.Debug().
Str("old_room_id", dbMsg.RoomID.String()). Str("old_room_id", dbMsg.RoomID.String()).
Str("sender_id", dbMsg.Sender). Str("sender_id", dbMsg.Sender).