From 1fd9c70257481142f4359718b5cf003855d257ae Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 15 Aug 2023 11:28:59 +0300 Subject: [PATCH] Ignore more tombstones, but only in DMs --- portal.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/portal.go b/portal.go index 632bff6..9c7e422 100644 --- a/portal.go +++ b/portal.go @@ -775,7 +775,8 @@ func shouldIgnoreStatus(status gmproto.MessageStatusType) bool { switch status { case gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_TEXT, gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_RCS, - gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS: + gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS, + gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO: return true default: return false @@ -791,7 +792,7 @@ func (portal *Portal) convertGoogleMessage(ctx context.Context, source *User, ev cm.ID = evt.MessageID cm.PartCount = len(evt.GetMessageInfo()) cm.Timestamp = time.UnixMicro(evt.Timestamp) - cm.DontBridge = shouldIgnoreStatus(cm.Status) + cm.DontBridge = portal.IsPrivateChat() && shouldIgnoreStatus(cm.Status) if cm.Status >= 200 && cm.Status < 300 { cm.Intent = portal.bridge.Bot if !portal.Encrypted && portal.IsPrivateChat() {