fix sync message in open group won't be marked as sent

This commit is contained in:
ryanzhao 2021-10-04 11:56:05 +11:00
parent ceb88f3d00
commit 204fe789ed
1 changed files with 3 additions and 2 deletions

View File

@ -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)