From 17048d1a10648b633e170900c4c6439760c64550 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Feb 2026 10:19:29 +0000 Subject: [PATCH] Document custom restrictions for presence and annotations Add clarification that custom restrictions also apply to presence messages and individual annotations. The user claim is included in extras.userClaim for both cases (presence.extras.userClaim and annotation.extras.userClaim). https://claude.ai/code/session_01TKV8vHU7MP62PNzDJuKwiF --- src/pages/docs/auth/capabilities.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/docs/auth/capabilities.mdx b/src/pages/docs/auth/capabilities.mdx index 34a9d2f663..6224f0e0bc 100644 --- a/src/pages/docs/auth/capabilities.mdx +++ b/src/pages/docs/auth/capabilities.mdx @@ -544,7 +544,9 @@ Capabilities are determined for [Ably JWTs](/docs/auth/token#jwt) in the followi It is possible for JWTs to contain authenticated claims for users that can be used to allow or disallow certain interactions in your channels. -Messages can be annotated with trusted metadata copied from the client's authentication token by Ably servers. Clients are unable to directly publish messages with user claim metadata, and claims contained within the authentication token are signed to prevent tampering. Claims can be scoped to individual channels or to namespaces of [channels](/docs/channels). The most specific user claim will be added to the message as part of the `extras` object. Note that this does not apply to presence or metadata messages. +Messages can be annotated with trusted metadata copied from the client's authentication token by Ably servers. Clients are unable to directly publish messages with user claim metadata, and claims contained within the authentication token are signed to prevent tampering. Claims can be scoped to individual channels or to namespaces of [channels](/docs/channels). The most specific user claim will be added to the message as part of the `extras` object. + +Custom restrictions also apply to presence messages and individual annotations. In both cases, the user claim is included in `extras.userClaim`. To set the trusted fields you need to include `ably.channel.*` in your JWT authentication payload, for example: