From fd108e9d00f72d709cda4c1f671df2cbe7cbd802 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Wed, 7 Oct 2020 14:55:05 +1100 Subject: [PATCH] fix the crash when editing ssk groups with both adding and removing --- .../securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt b/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt index da527c5f87..7d7aa28032 100644 --- a/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt +++ b/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt @@ -153,7 +153,7 @@ class ClosedGroupUpdateMessageSendJob private constructor(parameters: Parameters "New" -> { val name = data.getString("name") val groupPrivateKey = data.getByteArray("groupPrivateKey") - val senderKeys = data.getString("senderKeys").split(" - ").map { ClosedGroupSenderKey.fromJSON(it)!! } + val senderKeys = data.getStringOrDefault("senderKeys","").split(" - ").mapNotNull { ClosedGroupSenderKey.fromJSON(it) } // Can be empty val members = data.getString("members").split(" - ").map { Hex.fromStringCondensed(it) } val admins = data.getString("admins").split(" - ").map { Hex.fromStringCondensed(it) } kind = Kind.New(groupPublicKey, name, groupPrivateKey, senderKeys, members, admins)