From 6186c22e0263cf2004a5200045edfe52b439edfc Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 17 Apr 2020 10:01:16 +0200 Subject: [PATCH] improve code --- .../android/internal/crypto/actions/MessageEncrypter.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/MessageEncrypter.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/MessageEncrypter.kt index 9961f40b9a..c1cdbe59f9 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/MessageEncrypter.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/MessageEncrypter.kt @@ -58,11 +58,9 @@ internal class MessageEncrypter @Inject constructor( // homeserver signed by the ed25519 key this proves that // the curve25519 key and the ed25519 key are owned by // the same device. - val keysMap = HashMap() - keysMap["ed25519"] = olmDevice.deviceEd25519Key!! - payloadJson["keys"] = keysMap + payloadJson["keys"] = mapOf("ed25519" to olmDevice.deviceEd25519Key!!) - val ciphertext = HashMap() + val ciphertext = mutableMapOf() for ((deviceKey, deviceInfo) in deviceInfoParticipantKey) { val sessionId = olmDevice.getSessionId(deviceKey)