Conversation
Add a dedicated "User claims" section to the Chat setup page explaining how to set room-scoped JWT claims and read the userClaim field from events. Add userClaim to property tables for messages, presence, typing, room reactions, and message reactions. Update the Chat REST API OpenAPI spec to include the userClaim field on the Message schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| ### User claims <a id="user-claims"/> | ||
|
|
||
| <If lang="javascript,react"> |
There was a problem hiding this comment.
Should this go before the heading, otherwise it'll be an empty header for Kotlin/Swift.
src/pages/docs/chat/setup.mdx
Outdated
| The `userClaim` value is always a string. If you encode a JSON object in the claim, you must parse it on the client. The value is only present if the publishing user's token contained a matching claim for the room. | ||
| </Aside> | ||
|
|
||
| For more details on how user claims work at the platform level, including channel-scoped claims and matching rules, see the [custom restrictions](/docs/auth/capabilities#custom-restrictions) documentation. |
There was a problem hiding this comment.
Is this necessary? I feel you've covered everything here related to Chat.
- Move <If lang> before heading so user claims section is hidden entirely for non-JS/React languages (no empty header) - Remove redundant link to custom restrictions docs - Update typing.currentTypers for JS/React only, keep typing.current for Swift/Kotlin/Android - Add React code sample for currentTypers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
/docs/chat/setup) explaining how to set room-scoped JWT claims (ably.room.<roomName>) and read theuserClaimfield from eventsuserClaimto property tables for messages, presence, typing indicators, room reactions, and message reactionsuserClaimfield on the Message schemaCorresponds to SDK PR: ably/ably-chat-js#711
Test plan
/docs/chat/setuprenders correctly (JS/React language tabs)userClaimrows appear in property tables on messages, presence, typing, and reactions pages/docs/api/chat-restshows theuserClaimfield on the Message schema#user-claims,#set-user-claims)🤖 Generated with Claude Code
CHA-1243