Build / Build (push) Successful in 56s
Settings gets "Notifications on this device" (PushEditor): personas, alerts in four groups, policy, a test
notification, after a one-time notice of what the push service learns. Each persona ticked gets its own service
worker registration (push-worker.js at push/{slot}/), so its own endpoint and keys, subscribed with its own token
(IHttpService's *As); nothing PrivaPub stores ties two personas together and the worker never reads the payload's
token. PushService follows the tokens (re-subscribing after a renewal), reconciles at every session start, turns
off before sign-out and drops deleted or suspended personas. A click opens that persona's notifications; the app
badge counts the unread ones. Exchanges now ask for the push scope.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WpVCoDeM1qUTRp4fXQdfof
7 lines
450 B
JavaScript
7 lines
450 B
JavaScript
// In development, always fetch from the network and do not enable offline support.
|
|
// This is because caching would make development more difficult (changes would not
|
|
// be reflected on the first load after each change).
|
|
// Web Push has workers of its own, one registration per persona at push/{slot}/ (push-worker.js, the same file in
|
|
// development and published builds): this worker receives no pushes.
|
|
self.addEventListener('fetch', () => { });
|