Client: mirror branded notification sound to customer app
The customer app now uses the same halobestie_notif.ogg as the mitra app (shipped in the previous commit). Channel ID unified across both apps so backend FCM stops branching per recipient. - client_app: same channel bump (chat_messages → halobestie_chat_v1) + RawResourceAndroidNotificationSound binding, both at channel- create time and per-notification details. .ogg copied to client_app/android/app/src/main/res/raw/halobestie_notif.ogg (same 32 KB asset, identical file). - Backend: drop the per-recipientType channel ID branch; everyone targets halobestie_chat_v1 now. Verified on emulator-5554 (customer): dumpsys shows the channel bound to android.resource://com.mybestie/raw/halobestie_notif. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,14 +21,6 @@ export const sendPushNotification = async (recipientType, recipientId, { title,
|
||||
|
||||
if (!user?.fcm_token) return false
|
||||
|
||||
// Mitra app ships a branded notification sound on its own channel
|
||||
// (`halobestie_chat_v1`, declared in mitra_app/lib/core/notifications/
|
||||
// notification_service.dart). Customer app keeps the legacy
|
||||
// `chat_messages` channel until/unless we ship a customer sound too.
|
||||
const androidChannelId = recipientType === UserType.MITRA
|
||||
? 'halobestie_chat_v1'
|
||||
: 'chat_messages'
|
||||
|
||||
try {
|
||||
await admin.messaging().send({
|
||||
token: user.fcm_token,
|
||||
@@ -41,7 +33,10 @@ export const sendPushNotification = async (recipientType, recipientId, { title,
|
||||
},
|
||||
android: {
|
||||
priority: 'high',
|
||||
notification: { channelId: androidChannelId },
|
||||
// Both apps register the same channel ID with the branded
|
||||
// notification sound (halobestie_notif.ogg in res/raw). See each
|
||||
// app's lib/core/notifications/notification_service.dart.
|
||||
notification: { channelId: 'halobestie_chat_v1' },
|
||||
},
|
||||
apns: {
|
||||
payload: {
|
||||
|
||||
Reference in New Issue
Block a user