This differential modifies the way we handle get_device_lists_for_users RPC so that the client extracts users devices platofrm details as well.
Details
- Build web and native client. Disable database encryption on native client.
- Log in/register on both platforms with two different users. Make those users friends.
- Add console.log to peer-llist-hooks to log the result.
- Click create initial peer list in TB menu.
- Examine logs and ensure that both users have each other in peer list and patform details are correct.
- Fetch SQLite content from XCode/Android studio and ensure that platform details of peers are persisted in aux users table in SQLite.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Related comment from @ashoat: https://phab.comm.dev/D12272#inline-72196
We should consider if passing PlatformDetails directly as a JSON wouldn't be better here. You wouldn't have to convert it on Rust side
web/grpc/identity-service-client-wrapper.js | ||
---|---|---|
561 ↗ | (On Diff #40922) | Why does this need to be read-only? It's a collection you're building here, so it seems like it should be mutable. When you return it, Flow should be able to implicitly re-cast it to be read-only If you make the collection mutable here, you should be able to mutate things directly in the forEach below |
564 ↗ | (On Diff #40922) | I don't understand why we use .forEach instead of a for-each loop |
web/grpc/identity-service-client-wrapper.js | ||
---|---|---|
560–574 ↗ | (On Diff #40978) | The point of making the collection not mutable is that you can mutate it here instead of creating a new collection on each loop iteration The inner part can be left as immutable since you never need to mutate it |
native/native_rust_library/src/identity/device_list.rs | ||
---|---|---|
145 ↗ | (On Diff #40985) | Short notation can be used |