From df4aab1d73b40057649f268fb643880eb430b84c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 May 2020 23:37:10 +0200 Subject: [PATCH] Use EventType.isCallEvent() --- .../internal/session/call/CallEventsObserverTask.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/call/CallEventsObserverTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/call/CallEventsObserverTask.kt index 2aeabc09f4..919600f3bc 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/call/CallEventsObserverTask.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/call/CallEventsObserverTask.kt @@ -57,13 +57,8 @@ internal class DefaultCallEventsObserverTask @Inject constructor( Timber.w("Event with no room id ${event.eventId}") } decryptIfNeeded(event) - when (event.getClearType()) { - EventType.CALL_INVITE, - EventType.CALL_CANDIDATES, - EventType.CALL_HANGUP, - EventType.CALL_ANSWER -> { - callService.onCallEvent(event) - } + if (EventType.isCallEvent(event.getClearType())) { + callService.onCallEvent(event) } } Timber.v("$realm : $userId")