-
-
Notifications
You must be signed in to change notification settings - Fork 769
Description
Problem
Deleting a message using a specific client token causes the message to disappear for all clients, regardless of when they connected or which token was used. This invalidates the purpose of client-level scoping and introduces confusion about visibility rules.
Steps to reproduce
- Send a message using an app (AppToken A) and a client token T1.
- Connect from another device or browser (new client, token T2).
- Delete the message using token T2.
- Refresh browser from T1 — the message is gone.
Expected behavior
If client tokens define scoped message views, deletion should be isolated to the issuing client only.
Alternatively, if messages are globally visible per app, then deletion should be bound to the app identity — not the client — and the concept of “client” should be dropped or clarified.
Suggested resolution
The current model mixes concepts without clear enforcement:
- If all clients see the same messages, there is no benefit in having message deletion scoped to client tokens.
- Replace deletion logic to be based on the app identity, i.e. deleting globally per app.
- Either remove the "client" concept entirely or repurpose it for filtering logic (e.g. per-client view settings), not for visibility or ownership.
This also opens the door for features like server-side retention (e.g. keep only last N messages) and unique messages, managed cleanly per app.