fix: suppress stale push notifications for active chats
Some checks failed
Android CI / android (push) Failing after 4m25s
Android Release / release (push) Has started running
CI / test (push) Has been cancelled

fix: clear existing chat notifications when FCM arrives for an already open conversation
This commit is contained in:
2026-04-05 15:05:48 +03:00
parent 75214737b9
commit 904ce1bbcd

View File

@@ -23,6 +23,7 @@ class MessengerFirebaseMessagingService : FirebaseMessagingService() {
override fun onMessageReceived(message: RemoteMessage) {
val payload = PushPayloadParser.parse(message) ?: return
if (activeChatTracker.activeChatId.value == payload.chatId) {
notificationDispatcher.clearChatNotifications(payload.chatId)
return
}
notificationDispatcher.showChatMessage(payload)