Migrate the message poll to the generated PollResponseData model - #6680
Migrate the message poll to the generated PollResponseData model#6680gpunto wants to merge 2 commits into
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe message DTO now uses ChangesPoll mapping
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Message poll parsing now uses the generated response model and its updated timestamp while preserving domain poll mapping and custom data behavior. The supplied coverage and current implementation alignment indicate no remaining merge-blocking risk. Suggested reviewers: Poem
🚥 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. Comment |



Goal
Parse the poll embedded in a message with the generated
PollResponseData.Part of AND-1291
Implementation
DownstreamMessageDto.pollatPollResponseData, the model the poll endpoints already use, and follow the field rename inlastUpdateTime().PollResponseData.toDomain()was already in place, so no mapping code is added.UserResponserequirescreated_at,updated_atandlanguage, and the fixture carried onlyid,role,bannedandonline.DownstreamPollDtostays for the poll events, which still parse it.Notes
The message carries
Poll *commonpayloads.PollResponseData, the same struct the poll endpoints return, andcreated_at,updated_atandlanguageare non-omitemptyonUserResponseCommonFields. So the wire always sends them for a nested poll user and the old fixture was the unrealistic part.Testing
getMessageandqueryChannels. Both custom values round-tripped, config was preserved, and every nested user (creator, votes, own votes, answers) carried the three required fields.message.poll, and droppingpoll.updatedAtfromlastUpdateTime, each fail 6 tests.Summary by CodeRabbit