Migrate the channel watchers and channel and thread creators to the generated UserResponse - #6736
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
…ated UserResponse
9928394 to
8552279
Compare
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (17)
💤 Files with no reviewable changes (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe client removes the offset-and-limit draft query API. Channel and thread DTO user fields now use ChangesDraft Query API
UserResponse DTO and Parsing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue is established from the reviewed changes; merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changed user parsing preserves the existing domain data path, and no new security boundary or weakened control was established. Compatibility with less-complete server responses remains uncertain. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. I’m a rabbit with a parsing plan, Comment |
|
🚀 Available in v7.13.0 |



Goal
Parse the channel watchers and the channel and thread
created_bywith the generatedUserResponse, andkeep two user keys in
extraDatathat the generated user models had started dropping.Part of AND-1291
Implementation
watchers(channel response and channel), the channelcreated_byand the thread and thread-infocreated_byat the generatedUserResponse. The existingUserResponsemapper handles them.deleted_atandrevoke_tokens_issued_beforeinUser.extraDatafor everyUserResponse, asthe event user models already did. The generated model declares both, so they stopped reaching
extraDataon every path that moved to it, while the hand-written user DTO left them there.queryDraftMessages(offset, limit)API call and its request model. Nothing called it;drafts are queried through
queryDrafts.Notes
The mute response's
own_userstays on the hand-written DTO. The E2E mock server builds it withoutinvisibleand the unread counters, which the generatedOwnUserResponserequires.Testing
UserResponseParityTestparses the same user JSON through the hand-written DTO and the generated model andrequires the same
User, with a user carrying every optional field and custom data.Device-probed a channel and a thread created with a custom field set on the user: the channel
created_by, the watcher list and the threadcreated_byeach matched the same user read throughgetMessagefield by field, custom field included.Summary by CodeRabbit