Add userClaim field across chat entities#193
Draft
AndyTWF wants to merge 1 commit into
Draft
Conversation
Add server-provided userClaim (JWT claim) support to Message, RoomReaction, MessageReaction, TypingSetEvent.Change, and PresenceMember interfaces. For Messages, RoomReactions, and MessageReactions, userClaim is extracted from realtime message/annotation extras. For Messages it is also parsed from REST API responses. For Typing, userClaim is cached across heartbeats and preserved in timed-stop events. Presence defines the API contract but leaves it null pending ably-java PresenceMessage.extras support. Spec: CHA-M2h, CHA-MR7d, CHA-ER2a, CHA-PR6g, CHA-T13a1 [CHA-1243] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedDraft detected. 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 |
Code Coverage
|
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
userClaim(JWT claim) field toMessage,RoomReaction,MessageReaction,TypingSetEvent.Change, andPresenceMemberinterfacesuserClaimfrom realtime message/annotation extras for Messages, RoomReactions, and MessageReactionsuserClaimfrom REST API responses for MessagesuserClaimacross typing heartbeats and preserve in timed-stop eventsuserClaimAPI onPresenceMember(alwaysnullpending ably-javaPresenceMessage.extrassupport)MessageExtras?.userClaim()helper for safe extraction from extras JSONSpec: CHA-M2h, CHA-MR7d, CHA-ER2a, CHA-PR6g, CHA-T13a1
Ref: ably/specification#423, ably/ably-chat-js#711
Test plan
userClaimparsing from realtime message extras (present, absent, non-string)userClaimparsing from REST API responsesuserClaimextraction from room reaction extrasuserClaimextraction from annotation extras in raw message reaction eventsuserClaimin typing start/stop events, heartbeat preservation, timed-stop, and precedence logic./gradlew checkpasses (detekt + all tests + lint)./gradlew apiDump🤖 Generated with Claude Code