From 6a32fabda5e0a9139a088d44e049dc49f78e0c59 Mon Sep 17 00:00:00 2001 From: Brice-W Date: Mon, 26 Apr 2021 15:38:26 +1000 Subject: [PATCH] revert change of commit 7c6475d9ee5de4326a94caca909c241e8ab3aa7c --- .../messaging/sending_receiving/MessageSenderClosedGroup.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt index 36104265cb..8e3622282b 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroup.kt @@ -277,9 +277,7 @@ fun MessageSender.sendEncryptionKeyPair(groupPublicKey: String, newKeyPair: ECKe val ciphertext = MessageSenderEncryption.encryptWithSessionProtocol(plaintext, publicKey) ClosedGroupControlMessage.KeyPairWrapper(publicKey, ByteString.copyFrom(ciphertext)) } - // we only set public key of EncryptionKeyPair if we send the message to a one-on-one contact, otherwise if sent to a group it is set tu null as we use the one of the envelope - val kind = if (targetUser != null) ClosedGroupControlMessage.Kind.EncryptionKeyPair(ByteString.copyFrom(Hex.fromStringCondensed(groupPublicKey)), wrappers) - else ClosedGroupControlMessage.Kind.EncryptionKeyPair(null, wrappers) + val kind = ClosedGroupControlMessage.Kind.EncryptionKeyPair(ByteString.copyFrom(Hex.fromStringCondensed(groupPublicKey)), wrappers) val sentTime = System.currentTimeMillis() val closedGroupControlMessage = ClosedGroupControlMessage(kind) closedGroupControlMessage.sentTimestamp = sentTime