Repository navigation
Move app settings, users and polls to the v2 endpoints - #6821
Conversation
SDK Size Comparison 📏
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
andremion
left a comment
There was a problem hiding this comment.
One question on the devices handling and a small cleanup nit.
… stored custom copy
…he user models leave out
|
andremion
left a comment
There was a problem hiding this comment.
LGTM, thanks for the follow-ups.




Goal
First step of moving the REST calls to the v2 endpoints: app settings, roles, devices, push preferences, OG, users, blocks, live locations, guest, polls, poll votes and user groups. The websocket stays on v1.
Part of AND-1637
Implementation
buildV2RetrofitApibuilds these APIs on/api/v2/...paths with the generatedSerializerfor bodies. Errors keep the v1 envelope, so interceptors and the call adapter are unchanged./api/v2/chat/messages/....custom.withDeclaredadds them back toextraData, so both lanes map to the sameUser.devices. v1 responses hide that copy; v2 returns it. The user mappers now drop it fromextraData, and it is no longer sent in the user upsert or the connectuser_details.Testing
V2LaneBatchOneTest,V2LaneBatchTwoTestandV2LaneBatchThreeTestparse v2 responses and serialize v2 requests for every moved endpoint.DomainMappingTest,DtoMappingTestandSocketFactoryTestcover thedevicescopy on reads, the upsert and connect.deviceshandling: a user seeded with a storeddevicescopy (returned by v2) maps without it,updateUserandconnectUserwith adeviceskey inextraDatasend other custom keys but notdevices, and nothing is stored under it.Summary by CodeRabbit