Repository navigation
Migrate the message updated and deleted events to the generated event models - #6789
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
andremion
left a comment
There was a problem hiding this comment.
One inline comment about /sync on older backends.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (12)
💤 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; 3 remain after this review. WalkthroughMessage-deleted and message-updated events now parse through generated network models and map to domain events. The changes add model definitions, update parser adapters and event dispatch, and revise fixtures and tests for socket and sync parsing. ChangesMessage Event Parsing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge blocker is identified; complete the normal test checks before merging. 🚥 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 event’s trail, Comment |
|



Goal
Parse the
message.updatedandmessage.deletedevents with the generated event models.Part of AND-1291
Implementation
MessageUpdatedEventandMessageDeletedEvent, with theMessageUpdateandMessageChangeSetthey carry, and delete the hand-written DTOs.message.updated, which the domain events need. The channel type and id come from the cid.hard_deleteandmessage_idare nullable inMessageDeletedEvent, andmessage_idinMessageUpdatedEvent: backends before v239.47.0 replay these events on/syncwithout them, and the spec marks them required. A missinghard_deletemaps to false, as before; the mapper never readsmessage_id. The model comments say when to drop the patches.CustomAdapterCoverageTestonly checkscustomfields that hold custom data:MessageChangeSet.customis a flag saying the custom data changed.Testing
GeneratedMessageEventParsingTestcovers both events from the socket and from/sync, a replayed update withoutmessage_id, a replayed deletion withoutmessage_idandhard_delete, and rejects an event missing a required field. The mapping tests cover every field, including the replayed shape.On a device: updated a message with custom data, partially updated and pinned it, and soft deleted, hard deleted and deleted a message for me. Every domain field was set, custom data round-tripped, and
/syncparsed the replayed deletions.🤖 Generated with Claude Code
Summary by CodeRabbit