From a050d7fa76dc8c0acb105ec77d28889ccc1bbc8b Mon Sep 17 00:00:00 2001 From: Sivert Date: Wed, 7 Oct 2026 13:23:35 +0200 Subject: [PATCH] Document pins, mentions, blocks and contact preferences on the socket page Twelve events the server already has and the page left out. The socket coverage check has a 70% floor, and the three push:* events in Gryt-chat/server#283 tipped the server's side to 69%. This lifts it to 75% with those three still undocumented. They can't go on the page until the server has them, because the docs side fails on events the server doesn't have yet. So they follow once #283 merges. Co-Authored-By: Claude Opus 5.5 --- content/docs/build/server-api.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/content/docs/build/server-api.mdx b/content/docs/build/server-api.mdx index 5f0a91e..e56eeae 100644 --- a/content/docs/build/server-api.mdx +++ b/content/docs/build/server-api.mdx @@ -255,8 +255,29 @@ signing file links. It's the same shape as `fileKey` above. | `chat:history` | server → client | Answer to `chat:fetch` | | `chat:purge_user` | server → client | Everything from one member is gone | | `chat:merge_user` | server → client | A guest was merged into an account: `{ from_server_user_id, to_server_user_id }` | +| `chat:pin` | client → server | `{ accessToken, conversationId, messageId, pinned }` | +| `chat:pins` | both | Ask with `{ conversationId }`, and the answer comes back on the same name | +| `chat:pinned` | server → client | A message was pinned or unpinned | | `chat:error` | server → client | | +### Mentions + +| Event | Direction | Notes | +|-------|-----------|-------| +| `mentions:list`, `mentions:seen` | client → server | | +| `mentions:list` | server → client | Answer to both, with the unseen mentions and counts per channel and thread | +| `mention:new` | server → client | You were mentioned while connected | + +### Blocking, and who can reach you + +| Event | Direction | Notes | +|-------|-----------|-------| +| `user:block`, `user:unblock` | client → server | `{ accessToken, serverUserId }` | +| `user:blocks:list` | client → server | | +| `user:blocked`, `user:unblocked`, `user:blocks` | server → client | | +| `contact:prefs:get`, `contact:prefs:set` | client → server | Who may message or call you, `everyone`, `friends` or `nobody` | +| `contact:prefs` | server → client | Answer to both | + ### Direct messages A conversation between two people, or a group. `dm:open` is idempotent — asking