Add userClaim field support across chat entities#423
Open
Conversation
20d46b7 to
8795d4c
Compare
Add optional userClaim field to chat specification for: - Message V4 structure - MessageReactionRawEvent - RoomReaction (Ephemeral) - PresenceMember - TypingEvent V3 The userClaim field is server-provided from JWT claims embedded in realtime message extras. It is read-only and cannot be sent by clients. Specification points added: - CHA-M2h: userClaim in Message - CHA-MR7a1: userClaim in MessageReactionRawEvent - CHA-ER2a: userClaim in RoomReaction - CHA-PR6a1: userClaim in PresenceMember - CHA-T13a1: userClaim in TypingEvent Related to: ably/ably-chat-js#711 https://claude.ai/code/session_018wsKegy1oEvaaKuc8kD16V
8795d4c to
6a5db56
Compare
7 tasks
splindsay-92
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change adds support for an optional
userClaimfield across multiple chat entities (Messages, Reactions, Presence Members, and Typing Events). TheuserClaimfield is a server-provided string extracted from JWT claims embedded in realtime message extras, enabling better user identification and authentication tracking in chat operations.CHA-1243
Key Changes
Messages: Added
userClaimfield to Message objects with specification requirements that it is read-only, server-provided, and extracted from JWT claims in realtime message extras or REST API responses.Message Reactions: Added
userClaimfield support to both raw message reaction events (MessageReactionRawEvent) and ephemeral room reactions (Reaction), with the same read-only, server-provided semantics.Presence Members: Added
userClaimfield toPresenceMemberobjects and presence events, extracted from the underlying Ably realtime presence message extras.Typing Events: Added
userClaimfield to typing event changes with an additional requirement that the claim must be preserved across heartbeat events and inactivity timeouts for a givenclientId.Implementation Details
userClaimfields are marked as optional and read-onlyuserClaimwhen publishing messages, reactions, or entering presenceextras.userClaimin the underlying Ably realtime messageshttps://claude.ai/code/session_018wsKegy1oEvaaKuc8kD16V