mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:33:39 +00:00
fix: handle pendingKeyPair.getOrElse nullable after checking if key exists
This commit is contained in:
parent
93f7d428cb
commit
8476e090e2
@ -548,9 +548,8 @@ object ClosedGroupsProtocolV2 {
|
||||
}
|
||||
if (userPublicKey in admins) {
|
||||
// send current encryption key to the latest added members
|
||||
val encryptionKeyPair = pendingKeyPair.getOrElse(groupPublicKey) {
|
||||
Optional.fromNullable(apiDB.getLatestClosedGroupEncryptionKeyPair(groupPublicKey))
|
||||
}.orNull()
|
||||
val encryptionKeyPair = pendingKeyPair[groupPublicKey]?.orNull()
|
||||
?: apiDB.getLatestClosedGroupEncryptionKeyPair(groupPublicKey)
|
||||
if (encryptionKeyPair == null) {
|
||||
Log.d("Loki", "Couldn't get encryption key pair for closed group.")
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user