From f43f9171e53786888cc6830a38cf94ec56ed8195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Thu, 1 Dec 2022 11:58:27 +0000 Subject: [PATCH] [SG-860] Add condition to execute notification tap code (#2211) --- src/App/Services/PushNotificationListenerService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App/Services/PushNotificationListenerService.cs b/src/App/Services/PushNotificationListenerService.cs index 80adee2e1..cb7887fbf 100644 --- a/src/App/Services/PushNotificationListenerService.cs +++ b/src/App/Services/PushNotificationListenerService.cs @@ -228,8 +228,9 @@ namespace Bit.App.Services if (data is PasswordlessNotificationData passwordlessNotificationData) { var notificationUserId = await _stateService.Value.GetUserIdAsync(passwordlessNotificationData.UserEmail); + var activeUserEmail = await _stateService.Value.GetActiveUserEmailAsync(); var notificationSaved = await _stateService.Value.GetPasswordlessLoginNotificationAsync(); - if (notificationUserId != null && notificationSaved != null) + if (activeUserEmail != passwordlessNotificationData.UserEmail && notificationUserId != null && notificationSaved != null) { await _stateService.Value.SetActiveUserAsync(notificationUserId); _messagingService.Value.Send(AccountsManagerMessageCommands.SWITCHED_ACCOUNT);