From 667613f0c5c8510a533441b3b001df069b9d91a5 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 21 Aug 2023 10:58:34 +0300 Subject: [PATCH] Ignore downloading messages moving away from groups --- portal.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/portal.go b/portal.go index 22f9f38..883682a 100644 --- a/portal.go +++ b/portal.go @@ -428,6 +428,10 @@ func (portal *Portal) handleExistingMessageUpdate(ctx context.Context, source *U } if chatIDChanged { 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(). Str("old_room_id", dbMsg.RoomID.String()). Str("sender_id", dbMsg.Sender).