Use EventType.isCallEvent()

This commit is contained in:
Benoit Marty 2020-05-28 23:37:10 +02:00 committed by Valere
parent d3f93984d4
commit df4aab1d73
1 changed files with 2 additions and 7 deletions

View File

@ -57,15 +57,10 @@ internal class DefaultCallEventsObserverTask @Inject constructor(
Timber.w("Event with no room id ${event.eventId}") Timber.w("Event with no room id ${event.eventId}")
} }
decryptIfNeeded(event) decryptIfNeeded(event)
when (event.getClearType()) { if (EventType.isCallEvent(event.getClearType())) {
EventType.CALL_INVITE,
EventType.CALL_CANDIDATES,
EventType.CALL_HANGUP,
EventType.CALL_ANSWER -> {
callService.onCallEvent(event) callService.onCallEvent(event)
} }
} }
}
Timber.v("$realm : $userId") Timber.v("$realm : $userId")
} }