Repository navigation
Migrate the message responses to the generated responses - #6775
Conversation
SDK Size Comparison 📏
|
079c934 to
5b96903
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (21)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review. WalkthroughMessage endpoints now use endpoint-specific response models. The parser and domain mapping support message-with-channel responses, while API mapping handles nullable messages and pending-message responses. Tests cover endpoint result types and parser mapping parity. ChangesMessage response parsing and mapping
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to No blocking regression is established. The response shape for pending messages remains unconfirmed, so confidence in merge readiness is limited. 🚥 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. A rabbit checks each message type, Comment |
andremion
left a comment
There was a problem hiding this comment.
Looks good. One small nit inline.
207b951 to
eaa8071
Compare
|



Goal
Parse the message responses (send, get, update, partial update, delete, action, delete reaction and translate) with the generated response models.
Part of AND-1291
Implementation
MessageResponseenvelope is deleted.getMessagemaps the generatedMessageWithChannelResponse, taking the message's channel info from the channel it carries. It gets its own custom data adapter, soextraDatais kept.messageoptional. A response without it is aResult.Failure.getPendingMessagereturns empty metadata. The backend only sends pending message metadata to server-side callers, so it is always empty for the SDK.MessageWithChannelResponsecomes off the patched models list: it isMessageResponsepluschannel, and its null collections are covered by a test.Testing
GetMessageResponseParityTestruns every shared message fixture, with a nested channel, through the generated model: it matches the generatedMessageResponsefield by field and maps to the sameMessageas the hand-written DTO, including the channel info and custom data.MoshiChatApiTestcovers each endpoint, including a partial update or action without a message.On a device: sent, read, updated, partially updated and deleted messages (soft, hard and for me), deleted a reaction, translated, and shuffled and sent a giphy. Every response kept its custom data, and
getMessagecarried the channel.🤖 Generated with Claude Code
Summary by CodeRabbit