From eda6be5163835fd99595f2006f1ece86a7ceefa6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 8 Oct 2024 18:26:32 +0300 Subject: [PATCH] msgconv/from-whatsapp: don't bridge no-op disappearing timer changes --- pkg/msgconv/wa-misc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/msgconv/wa-misc.go b/pkg/msgconv/wa-misc.go index 17eabc40..6d6b2fe3 100644 --- a/pkg/msgconv/wa-misc.go +++ b/pkg/msgconv/wa-misc.go @@ -106,6 +106,7 @@ func (mc *MessageConverter) convertEphemeralSettingMessage(ctx context.Context, if disappear.Timer == 0 { disappear.Type = "" } + dontBridge := portal.Disappear == disappear content := bridgev2.DisappearingMessageNotice(disappear.Timer, false) if msg.EphemeralSettingTimestamp == nil || portalMeta.DisappearingTimerSetAt < msg.GetEphemeralSettingTimestamp() { portal.Disappear = disappear @@ -118,8 +119,9 @@ func (mc *MessageConverter) convertEphemeralSettingMessage(ctx context.Context, content.Body += ", but the change was ignored." } return &bridgev2.ConvertedMessagePart{ - Type: event.EventMessage, - Content: content, + Type: event.EventMessage, + Content: content, + DontBridge: dontBridge, }, nil }