diff --git a/SessionMessagingKit/Sending & Receiving/MessageSender+ClosedGroups.swift b/SessionMessagingKit/Sending & Receiving/MessageSender+ClosedGroups.swift index cdd367d0a..0c3f4fbc0 100644 --- a/SessionMessagingKit/Sending & Receiving/MessageSender+ClosedGroups.swift +++ b/SessionMessagingKit/Sending & Receiving/MessageSender+ClosedGroups.swift @@ -96,15 +96,13 @@ extension MessageSender : SharedSenderKeysDelegate { try generateAndSendNewEncryptionKeyPair(for: groupPublicKey, to: members.subtracting(newMembers), using: transaction) } // Send closed group update messages to any new members individually - if !newMembers.isEmpty { - for member in newMembers { - let thread = TSContactThread.getOrCreateThread(withContactId: member, transaction: transaction) - thread.save(with: transaction) - let closedGroupUpdateKind = ClosedGroupUpdateV2.Kind.new(publicKey: Data(hex: groupPublicKey), name: name, - encryptionKeyPair: encryptionKeyPair, members: membersAsData, admins: adminsAsData) - let closedGroupUpdate = ClosedGroupUpdateV2(kind: closedGroupUpdateKind) - MessageSender.send(closedGroupUpdate, in: thread, using: transaction) - } + for member in newMembers { + let thread = TSContactThread.getOrCreateThread(withContactId: member, transaction: transaction) + thread.save(with: transaction) + let closedGroupUpdateKind = ClosedGroupUpdateV2.Kind.new(publicKey: Data(hex: groupPublicKey), name: name, + encryptionKeyPair: encryptionKeyPair, members: membersAsData, admins: adminsAsData) + let closedGroupUpdate = ClosedGroupUpdateV2(kind: closedGroupUpdateKind) + MessageSender.send(closedGroupUpdate, in: thread, using: transaction) } } // Update the group