Fix verification not working

This commit is contained in:
ganfra 2022-04-01 17:49:08 +02:00
parent 046699bc84
commit 950c7f4a23
1 changed files with 8 additions and 7 deletions

View File

@ -167,14 +167,15 @@ internal class DefaultCryptoService @Inject constructor(
fun onLiveEvent(roomId: String, event: Event) {
if (event.isStateEvent()) {
when (event.getClearType()) {
EventType.STATE_ROOM_ENCRYPTION -> onRoomEncryptionEvent(roomId, event)
EventType.STATE_ROOM_MEMBER -> onRoomMembershipEvent(roomId, event)
EventType.STATE_ROOM_HISTORY_VISIBILITY -> onRoomHistoryVisibilityEvent(roomId, event)
else -> cryptoCoroutineScope.launch {
this@DefaultCryptoService.verificationService.onEvent(event)
when (event.getClearType()) {
EventType.STATE_ROOM_ENCRYPTION -> onRoomEncryptionEvent(roomId, event)
EventType.STATE_ROOM_MEMBER -> onRoomMembershipEvent(roomId, event)
EventType.STATE_ROOM_HISTORY_VISIBILITY -> onRoomHistoryVisibilityEvent(roomId, event)
}
} else {
cryptoCoroutineScope.launch {
verificationService.onEvent(event)
}
}
}
}