From cb16edbf37cbc99380e3ec85f0c4713a6f7412f3 Mon Sep 17 00:00:00 2001 From: heaven Date: Mon, 20 Apr 2026 22:24:07 +0300 Subject: [PATCH] dm calls mvp: phase 2.5.3: route call-notif FSI launch and body-tap to Direct tab instead of Home --- src/app/hooks/usePushNotifications.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/hooks/usePushNotifications.ts b/src/app/hooks/usePushNotifications.ts index 75f3334e..9332a688 100644 --- a/src/app/hooks/usePushNotifications.ts +++ b/src/app/hooks/usePushNotifications.ts @@ -366,6 +366,18 @@ export function usePushNotificationsLifecycle(): void { return; } + // FSI launch and body-tap on a call notification hit this path (no + // call_action extra, but notif_event_id is present — only call + // pushes carry it). DMs are currently the only call surface, so + // route to the Direct tab instead of the Home-tab fallback. + // Caveat: if group-call push is ever added, those events will also + // carry notif_event_id and this branch will route them to the DM + // tab incorrectly — revisit together with the group-call pipeline. + if (data.room_id && data.notif_event_id) { + navigate(getDirectRoomPath(data.room_id)); + return; + } + if (data.room_id) navigate(getHomeRoomPath(data.room_id)); } );