Repository navigation
Description
Product impact
- Primary loop layer: UX-Polish (notifications)
- Involves data loss, failed capture, or broken sync/trust
Describe the bug
On iPhone, tapping the "omi says …" notification for an answer from Omi opens the app but not the chat. The app stays on whatever screen it was on (Home after a cold start), so the answer is not shown. This is the deep link that #5126 fixed. It stopped working on iOS when push taps started going through NotificationUtil.routeFromFcmData (618efee, merged in #18858). Android still opens the chat.
To Reproduce
- On an iPhone, put Omi in the background or close it.
- Ask Omi a question with the device button or click-to-talk, so the answer arrives as an "omi says …" notification.
- Tap the notification.
Current behavior
The app comes to the front on its previous screen (or Home after a cold start). The chat with the answer does not open.
Expected behavior
Tapping the notification opens the Omi chat (/chat/omi), as it did after #5126 and as it still does on Android.
Evidence (upstream main at f26307c7e1301ccd8a86c8b66631572d81ee0874)
- Omi's answers are sent through
send_client_displayed_notification(_async), which addspush_type='chat_answer'(L403, L436) to data that already hasnavigate_to=/chat/{app_id}: backend/utils/notifications.py#L387-L451, backend/utils/chat.py#L676-L689. On iOS this data goes out with an APNS alert: backend/utils/notifications.py#L183-L192 - A tap calls
NotificationUtil.handleFcmDataTap(message.data): app/lib/services/notifications/notification_service_fcm.dart#L285-L295 routeFromFcmDatareturns null for any non-emptypush_typeother thancapture_recoverywithrepair_device(L105), sohandleFcmDataTapreturns false and nothing opens: app/lib/services/notifications.dart#L99-L118. Before 618efee, the tap usednavigateToFromFcmData, which ignorespush_type.- Android is not affected because its local BigText notification is built with only
navigate_toandmessage_idin the tap payload: app/lib/services/notifications/chat_answer_notification_handler.dart#L52-L57
In code: NotificationUtil.routeFromFcmData({'push_type': 'chat_answer', 'notification_type': 'plugin', 'navigate_to': '/chat/omi'}) returns null.
I have a fix with regression tests and will open a PR.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn review
Activity