Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mobile_app/hooks/useMessageNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export function useMessageNotifications(
if (appStateRef.current === 'active') {
onInApp(payload);
} else {
// Per-peer identifier replaces any prior unread notification from the
// same sender instead of stacking. Matches usePeerCountNotification's
// single-id pattern. On iOS this maps to UNNotificationRequest reuse;
// on Android the channel already groups under 'messages'.
Notifications.scheduleNotificationAsync({
identifier: `anonmesh-msg-${srcHash}`,
content: { title: sender, body: 'new message', sound: true },
trigger: null,
}).catch(() => {});
Expand Down
Loading