Ensure algorithm instance is created and stored

This commit is contained in:
Valere 2022-01-12 10:36:56 +01:00
parent 848a7f4062
commit f4c891abe6
1 changed files with 1 additions and 1 deletions

View File

@ -578,7 +578,7 @@ internal class DefaultCryptoService @Inject constructor(
// (for now at least. Maybe we should alert the user somehow?) // (for now at least. Maybe we should alert the user somehow?)
val existingAlgorithm = cryptoStore.getRoomAlgorithm(roomId) val existingAlgorithm = cryptoStore.getRoomAlgorithm(roomId)
if (existingAlgorithm == algorithm) { if (existingAlgorithm == algorithm && roomEncryptorsStore.get(roomId) != null) {
// ignore // ignore
Timber.tag(loggerTag.value).e("setEncryptionInRoom() : Ignoring m.room.encryption for same alg ($algorithm) in $roomId") Timber.tag(loggerTag.value).e("setEncryptionInRoom() : Ignoring m.room.encryption for same alg ($algorithm) in $roomId")
return false return false