mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 19:33:39 +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 ->
|
||||
val message = if (exception is ClosedGroupsProtocol.Error) exception.description else "An error occurred"
|
||||
Toast.makeText(this@EditClosedGroupActivity, message, Toast.LENGTH_LONG).show()
|
||||
loader.fadeOut()
|
||||
loaderContainer.fadeOut()
|
||||
isLoading = false
|
||||
}
|
||||
} else {
|
||||
|
@ -145,9 +145,7 @@ object ClosedGroupsProtocolV2 {
|
||||
val admins = group.admins.map { it.serialize() }
|
||||
val adminsAsData = admins.map { Hex.fromStringCondensed(it) }
|
||||
val sentTime = System.currentTimeMillis()
|
||||
val encryptionKeyPair = pendingKeyPair.getOrElse(groupPublicKey) {
|
||||
Optional.fromNullable(apiDB.getLatestClosedGroupEncryptionKeyPair(groupPublicKey))
|
||||
}.orNull()
|
||||
val encryptionKeyPair = pendingKeyPair[groupPublicKey]?.orNull() ?: Optional.fromNullable(apiDB.getLatestClosedGroupEncryptionKeyPair(groupPublicKey)).orNull()
|
||||
if (encryptionKeyPair == null) {
|
||||
Log.d("Loki", "Couldn't get encryption key pair for closed group.")
|
||||
throw Error.NoKeyPair
|
||||
|
Loading…
x
Reference in New Issue
Block a user