From b652b1136e3371da52ecb1d393c5ea3514ac7e92 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Thu, 11 Nov 2021 15:37:39 +0100 Subject: [PATCH] fix to stop notification if user joined on other device Signed-off-by: Marcel Hibbe --- .../talk/services/firebase/MagicFirebaseMessagingService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt b/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt index d8fd3fdb8..9e23e1c7e 100644 --- a/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt +++ b/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt @@ -63,7 +63,6 @@ import com.nextcloud.talk.utils.bundle.BundleKeys import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_FROM_NOTIFICATION_START_CALL import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_USER_ENTITY import com.nextcloud.talk.utils.preferences.AppPreferences -import com.nextcloud.talk.utils.singletons.ApplicationWideCurrentRoomHolder import io.reactivex.Observable import io.reactivex.Observer import io.reactivex.disposables.Disposable @@ -341,7 +340,8 @@ class MagicFirebaseMessagingService : FirebaseMessagingService() { hasParticipantsInCall = participantList.isNotEmpty() if (hasParticipantsInCall) { for (participant in participantList) { - if (participant.userId == signatureVerification.userEntity.userId) { + if (participant.actorId == signatureVerification.userEntity.userId && + participant.actorType == Participant.ActorType.USERS) { inCallOnDifferentDevice = true break }