From f5c680d76e7b80943d8b712e00f0fee1c83d300e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 25 Aug 2023 20:44:40 +0300 Subject: [PATCH] Ignore chat creation tombstones --- portal.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/portal.go b/portal.go index 0bb0fd1..cfefada 100644 --- a/portal.go +++ b/portal.go @@ -802,11 +802,21 @@ func (portal *Portal) shouldIgnoreStatus(status gmproto.MessageStatusType) bool gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_RCS, gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS, gmproto.MessageStatusType_TOMBSTONE_PROTOCOL_SWITCH_TO_ENCRYPTED_RCS_INFO, + gmproto.MessageStatusType_TOMBSTONE_ONE_ON_ONE_SMS_CREATED, + gmproto.MessageStatusType_TOMBSTONE_ONE_ON_ONE_RCS_CREATED, + gmproto.MessageStatusType_TOMBSTONE_ENCRYPTED_ONE_ON_ONE_RCS_CREATED, gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_TEXT_TO_E2EE, gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_TEXT, gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_RCS_TO_E2EE, gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_PROTOCOL_SWITCH_E2EE_TO_RCS: return portal.IsPrivateChat() + case gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_ENCRYPTED_GROUP_CREATED, + gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_E2EE_TO_RCS, + gmproto.MessageStatusType_MESSAGE_STATUS_TOMBSTONE_GROUP_PROTOCOL_SWITCH_RCS_TO_E2EE, + gmproto.MessageStatusType_TOMBSTONE_RCS_GROUP_CREATED, + gmproto.MessageStatusType_TOMBSTONE_MMS_GROUP_CREATED, + gmproto.MessageStatusType_TOMBSTONE_SMS_BROADCAST_CREATED: + return true case gmproto.MessageStatusType_TOMBSTONE_SHOW_LINK_PREVIEWS: return true default: