From f4c891abe6a1efb08b157899c8608461c12f46fc Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 12 Jan 2022 10:36:56 +0100 Subject: [PATCH] Ensure algorithm instance is created and stored --- .../matrix/android/sdk/internal/crypto/DefaultCryptoService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt index 7dd8cc73ae..0646e4d2b8 100755 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt @@ -578,7 +578,7 @@ internal class DefaultCryptoService @Inject constructor( // (for now at least. Maybe we should alert the user somehow?) val existingAlgorithm = cryptoStore.getRoomAlgorithm(roomId) - if (existingAlgorithm == algorithm) { + if (existingAlgorithm == algorithm && roomEncryptorsStore.get(roomId) != null) { // ignore Timber.tag(loggerTag.value).e("setEncryptionInRoom() : Ignoring m.room.encryption for same alg ($algorithm) in $roomId") return false