mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-16 04:51:25 +00:00
fix: fix ec send from pending if map contains absent value
This commit is contained in:
parent
5db46325a5
commit
e426d30f67
@ -298,7 +298,7 @@ class EditClosedGroupActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
}.failUi { exception ->
|
}.failUi { exception ->
|
||||||
val message = if (exception is ClosedGroupsProtocol.Error) exception.description else "An error occurred"
|
val message = if (exception is ClosedGroupsProtocol.Error) exception.description else "An error occurred"
|
||||||
Toast.makeText(this@EditClosedGroupActivity, message, Toast.LENGTH_LONG).show()
|
Toast.makeText(this@EditClosedGroupActivity, message, Toast.LENGTH_LONG).show()
|
||||||
loader.fadeOut()
|
loaderContainer.fadeOut()
|
||||||
isLoading = false
|
isLoading = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -145,9 +145,7 @@ object ClosedGroupsProtocolV2 {
|
|||||||
val admins = group.admins.map { it.serialize() }
|
val admins = group.admins.map { it.serialize() }
|
||||||
val adminsAsData = admins.map { Hex.fromStringCondensed(it) }
|
val adminsAsData = admins.map { Hex.fromStringCondensed(it) }
|
||||||
val sentTime = System.currentTimeMillis()
|
val sentTime = System.currentTimeMillis()
|
||||||
val encryptionKeyPair = pendingKeyPair.getOrElse(groupPublicKey) {
|
val encryptionKeyPair = pendingKeyPair[groupPublicKey]?.orNull() ?: Optional.fromNullable(apiDB.getLatestClosedGroupEncryptionKeyPair(groupPublicKey)).orNull()
|
||||||
Optional.fromNullable(apiDB.getLatestClosedGroupEncryptionKeyPair(groupPublicKey))
|
|
||||||
}.orNull()
|
|
||||||
if (encryptionKeyPair == null) {
|
if (encryptionKeyPair == null) {
|
||||||
Log.d("Loki", "Couldn't get encryption key pair for closed group.")
|
Log.d("Loki", "Couldn't get encryption key pair for closed group.")
|
||||||
throw Error.NoKeyPair
|
throw Error.NoKeyPair
|
||||||
|
Loading…
x
Reference in New Issue
Block a user