From 204fe789ede0cd655504a5e52be72eac9c15c526 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Mon, 4 Oct 2021 11:56:05 +1100 Subject: [PATCH] fix sync message in open group won't be marked as sent --- SessionMessagingKit/Database/Storage+Messaging.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SessionMessagingKit/Database/Storage+Messaging.swift b/SessionMessagingKit/Database/Storage+Messaging.swift index 0a6a84f99..e02363de7 100644 --- a/SessionMessagingKit/Database/Storage+Messaging.swift +++ b/SessionMessagingKit/Database/Storage+Messaging.swift @@ -32,8 +32,9 @@ extension Storage { var recipients: [String] = [] if let syncTarget = message.syncTarget { recipients.append(syncTarget) - } else if let thread = thread as? TSGroupThread, thread.isClosedGroup { - recipients = thread.groupModel.groupMemberIds + } else if let thread = thread as? TSGroupThread { + if thread.isClosedGroup { recipients = thread.groupModel.groupMemberIds } + else { recipients.append(LKGroupUtilities.getDecodedGroupID(thread.groupModel.groupId)) } } recipients.forEach { recipient in tsOutgoingMessage.update(withSentRecipient: recipient, wasSentByUD: true, transaction: transaction)