Sync Needs-you dismissals and chat read state across devices
This commit is contained in:
@@ -182,6 +182,22 @@ changes any subset; both reply with type `notification_settings` carrying all
|
||||
three keys. Unknown keys and non-boolean values are refused with an `error`
|
||||
reply and nothing is written.
|
||||
|
||||
## Clearing notifications across devices
|
||||
|
||||
The app's in-app attention state is shared through the server: dismissing an
|
||||
entry or using **Clear all** in the Needs-you sheet, and opening a chat (which
|
||||
clears its **New** badge), clears it on every connected browser and phone at
|
||||
once, and on a disconnected device when it next connects. The protocol is
|
||||
`{"type":"attention_acks"}` (read the whole set) and
|
||||
`{"type":"ack_attention","attention_acks":{"dismissed":["42:Failed"],"chat_seen":{"ses_x":1730000000000}}}`
|
||||
(add to it). Both reply `attention_acks`, and every other connection receives an
|
||||
`attention_acks_changed` frame with the change. Acknowledgements for deleted runs
|
||||
or sessions, or older than 30 days, are pruned.
|
||||
|
||||
This does **not** reach notifications the ntfy app has already shown on a phone:
|
||||
once ntfy delivered a message, the server cannot retract it, so those must still
|
||||
be swiped away in the ntfy app (or the Android notification shade).
|
||||
|
||||
## Explicit delivery stage (optional)
|
||||
|
||||
The preceding stage must output three nonempty UTF-8 strings: `title`, `summary`,
|
||||
|
||||
Reference in New Issue
Block a user