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

pull/513/head
ryanzhao 4 years ago
parent ceb88f3d00
commit 204fe789ed

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

Loading…
Cancel
Save