Do what the comment said

This commit is contained in:
Benoit Marty 2021-03-15 15:02:04 +01:00
parent c4aadfed33
commit 71f2c50799

View File

@ -38,7 +38,7 @@ internal class CryptoSessionInfoProvider @Inject constructor(
val encryptionEvent = monarchy.fetchCopied { realm ->
EventEntity.whereType(realm, roomId = roomId, type = EventType.STATE_ROOM_ENCRYPTION)
.contains(EventEntityFields.CONTENT, "\"algorithm\":\"$MXCRYPTO_ALGORITHM_MEGOLM\"")
.isNotNull(EventEntityFields.STATE_KEY) // should be an empty key
.isEmpty(EventEntityFields.STATE_KEY)
.findFirst()
}
return encryptionEvent != null