Files
HealthLog/src/lib/notifications
Marc-André Bombeck 1bb2afd829 feat(notifications): bubble dispatch outcome and whitelist iOS metadata
Two structural changes on the notification platform that unblock the
mood-reminder ledger-after-delivery semantics (separate commit) and
close the v0.5.4 PR #190 review's Security-H1 finding.

- `dispatchNotification` now returns `DispatchOutcome` with
  `dispatched`, `channelsAttempted`, and `channelsSucceeded`. The
  caller can decide whether the send is worth marking as committed
  in its own ledger. Existing callers that ignore the return value
  keep working — the function is still best-effort and never throws.
- `sendViaApns` now whitelists the metadata keys it forwards into
  the APNs custom payload. The dispatcher's `metadata` is shared
  across every channel and previously surfaced channel-specific
  payload structures (Telegram's `replyMarkup` keyboard, ad-hoc
  extras) into the APNs userInfo Apple sees and the iOS app's
  notification handler. The allowlist covers the keys iOS actually
  reads (`scheduledAt`, `localDate`, `medicationId`, `scheduleId`,
  `phase`, `date`) and drops the rest.
2026-05-17 23:43:50 +02:00
..
2026-05-16 03:17:00 +02:00
2026-05-16 03:17:00 +02:00
2026-03-10 20:14:33 +01:00