Перейти к содержанию

Changelog

0.2.1 — 2026-10-07

Fixes

  • APNs: apns-topic for appId = wallet is now th.co.onewallet.walletapp, the bundle id of one_wallet_app (was th.co.onewallet.app, which no app uses). APNs defines the topic as the bundle id of the token's app. Pushes on pre-public were delivered with the old value too, so this is a correctness fix, not a delivery fix. Tokens without appId still go without apns-topic.

0.2.0 — 2026-10-07

Changes

  • iOS: the sessionRevoked push (Auth Center, channel security) now carries aps.content-available: 1. Without it an alert push does not wake a backgrounded app, so on iOS a session revoked by an operator (forceSignOut, unbindDevice) was noticed only when the app was open or the notification was tapped; otherwise only when the access token expired. The push stays a visible alert (apns-push-type: alert, priority 10); Android and data are unchanged. The flag is not set on other pushes: iOS throttles frequent background wakes. Works with one_wallet_app 1.32.0+; older builds ignore it.
  • buildMessage() extracted from sendOne() in src/fcm.js so the FCM message can be tested without the network; 3 new tests.

Also in this release (previously not recorded)

  • APNs: apns-topic is set from the device token's appId (wallet, closeloop, merchant).
  • Redis: NOTIFICATIONS_REDIS_URL takes precedence over REDIS_URL, default redis://localhost:6379/4.
  • CONSUMER_GROUP_START_ID (default '0'): a newly created consumer group reads the stream from the beginning. Set '$' on a first deploy to skip the backlog.
  • payload.userId = 0 is accepted.
  • Node.js 22 (Dockerfile, engines).
  • package.json version brought in line with CHANGELOG.

0.1.1 — 2026-04-23

Fixes

  • Worker queries public.device_token instead of non-existent auth.device_token (Serverpod creates tables in public schema by default — README/CLAUDE/SQL grants docs updated accordingly).

Security

  • .gitignore tightened to catch Firebase Service Account JSON files under any name (onewallet-*-dev-*.json, onewallet-*-prod-*.json, *-service-account*.json), not only the original fcm-service-account*.json pattern.

0.1.0 — 2026-04-23

  • Initial release: Node.js worker for FCM push notifications.
  • Redis Streams consumer group (notifications-worker) reading stream.notifications.jobs.
  • notifications.notification_log table — per-message audit (user_id, channel, title, body, trace_id, status, targeted/succeeded/failed counts, FCM message IDs, errors).
  • Integration with Auth Center public.device_token (SELECT + DELETE via GRANT).
  • firebase-admin SDK for FCM HTTP v1; error classification: remove / retry / fatal.
  • On messaging/invalid-registration-token or registration-token-not-registered — DELETE from device_token.
  • XAUTOCLAIM recovery with maxDeliveryCount=5 (poison-pill DLQ).
  • Templates and localization live on the publisher side (PM / Auth Center); this service is pure delivery.
  • 15 unit tests (fcm error classification, handler pathways with mocked pg/fcm, consumer parsing).
  • Dockerfile, README, CLAUDE.md.