From 21b078a1808653f1ebd9f94db51c3c4d3cfd4f20 Mon Sep 17 00:00:00 2001 From: null Date: Thu, 25 Jun 2026 12:39:59 -0500 Subject: [PATCH] fix(notif): set FCM channel on remaining reminder senders (E-OBS) Add android.notification.channelId to the 4 senders not covered by the earlier batch: scheduledOutcomesReminder + dailyQuestionReminder + reengagement -> 'reminders'; sendGentleReminderCallable -> 'partner_activity'. Completes E-OBS so backgrounded pushes land on their proper channels (importance/sound + per-category toggle) instead of fcm_fallback. tsc green. Co-Authored-By: Claude Opus 4.8 --- functions/src/couples/scheduledOutcomesReminder.ts | 1 + functions/src/notifications/dailyQuestionReminder.ts | 1 + functions/src/notifications/reengagement.ts | 1 + functions/src/notifications/sendGentleReminderCallable.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/functions/src/couples/scheduledOutcomesReminder.ts b/functions/src/couples/scheduledOutcomesReminder.ts index c21c23bc..4a069bc7 100644 --- a/functions/src/couples/scheduledOutcomesReminder.ts +++ b/functions/src/couples/scheduledOutcomesReminder.ts @@ -123,6 +123,7 @@ async function sendOutcomeReminder( title: notification.title, body: notification.body, }, + android: { notification: { channelId: 'reminders' } }, // E-OBS data: { type: 'outcome_reminder', coupleId: notification.coupleId, diff --git a/functions/src/notifications/dailyQuestionReminder.ts b/functions/src/notifications/dailyQuestionReminder.ts index 7a4103fd..8fb8c51e 100644 --- a/functions/src/notifications/dailyQuestionReminder.ts +++ b/functions/src/notifications/dailyQuestionReminder.ts @@ -126,6 +126,7 @@ async function sendReminder( title: "Tonight's question is waiting.", body: 'Answer together before it expires.', }, + android: { notification: { channelId: 'reminders' } }, // E-OBS data: { type: 'daily_question_reminder', couple_id: coupleId, diff --git a/functions/src/notifications/reengagement.ts b/functions/src/notifications/reengagement.ts index 80e62276..c124f9e2 100644 --- a/functions/src/notifications/reengagement.ts +++ b/functions/src/notifications/reengagement.ts @@ -96,6 +96,7 @@ async function sendNudge( title: "It's been a while.", body: "Tonight's question is a good reason to reconnect.", }, + android: { notification: { channelId: 'reminders' } }, // E-OBS data: { type: 'reengagement', couple_id: coupleId, diff --git a/functions/src/notifications/sendGentleReminderCallable.ts b/functions/src/notifications/sendGentleReminderCallable.ts index 333b8665..73eae984 100644 --- a/functions/src/notifications/sendGentleReminderCallable.ts +++ b/functions/src/notifications/sendGentleReminderCallable.ts @@ -169,6 +169,7 @@ export const sendGentleReminderCallable = functions.https.onCall(async (_data, c title: 'Your partner is thinking about you.', body: "They left tonight's question open. Answer when you're ready.", }, + android: { notification: { channelId: 'partner_activity' } }, // E-OBS data: { type: 'gentle_reminder', couple_id: coupleId,