mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 12:33:39 +00:00
fix encryption key pair handling
This commit is contained in:
parent
b064f8f5d7
commit
15707b7060
@ -341,7 +341,8 @@ private fun MessageReceiver.handleClosedGroupEncryptionKeyPair(message: ClosedGr
|
|||||||
val storage = MessagingConfiguration.shared.storage
|
val storage = MessagingConfiguration.shared.storage
|
||||||
val senderPublicKey = message.sender ?: return
|
val senderPublicKey = message.sender ?: return
|
||||||
val kind = message.kind!! as? ClosedGroupControlMessage.Kind.EncryptionKeyPair ?: return
|
val kind = message.kind!! as? ClosedGroupControlMessage.Kind.EncryptionKeyPair ?: return
|
||||||
val groupPublicKey = kind.publicKey?.toByteArray()?.toHexString() ?: message.groupPublicKey ?: return
|
var groupPublicKey = kind.publicKey?.toByteArray()?.toHexString()
|
||||||
|
if (groupPublicKey.isNullOrEmpty()) groupPublicKey = message.groupPublicKey ?: return
|
||||||
val userPublicKey = storage.getUserPublicKey()!!
|
val userPublicKey = storage.getUserPublicKey()!!
|
||||||
val userKeyPair = storage.getUserX25519KeyPair()
|
val userKeyPair = storage.getUserX25519KeyPair()
|
||||||
// Unwrap the message
|
// Unwrap the message
|
||||||
|
Loading…
x
Reference in New Issue
Block a user