Page MenuHomePhabricator

[native] implementing getting outbound user keys in `IdentityServiceClient`
ClosedPublic

Authored by kamil on Jan 22 2024, 2:21 AM.
Tags
None
Referenced Files
F2195947: D10750.diff
Fri, Jul 5, 11:25 AM
Unknown Object (File)
Wed, Jul 3, 8:27 AM
Unknown Object (File)
Wed, Jul 3, 3:15 AM
Unknown Object (File)
Wed, Jul 3, 3:02 AM
Unknown Object (File)
Tue, Jul 2, 11:27 PM
Unknown Object (File)
Mon, Jul 1, 11:38 AM
Unknown Object (File)
Mon, Jul 1, 11:38 AM
Unknown Object (File)
Mon, Jul 1, 11:38 AM
Subscribers

Details

Summary

Call RPC to get keys of all devices of given user.

Depends on D10749

Test Plan

Call method

Diff Detail

Repository
rCOMM Comm
Branch
publish-outbound-2
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jan 22 2024, 4:38 AM
tomek requested changes to this revision.Jan 22 2024, 8:15 AM
tomek added inline comments.
native/identity-service/identity-service-context-provider.react.js
134 ↗(On Diff #35905)

Is this the right deviceID to use? We probably should use a device id from the result.

This revision now requires changes to proceed.Jan 22 2024, 8:15 AM
native/identity-service/identity-service-context-provider.react.js
132 ↗(On Diff #35905)

Noticed on line 103 we throw an Error in this case, but it's a little different because we only have one set of keys there, but here are there are multiple. I guess this difference is probably okay

native/identity-service/identity-service-context-provider.react.js
173–192

not happy with the indentation here but other solutions are not better I think

132 ↗(On Diff #35905)

yeah. that's on purpose to avoid cases when an invalid device's keys in the map cause errors for all

134 ↗(On Diff #35905)

good call, that was mistake

tomek added inline comments.
native/identity-service/identity-service-context-provider.react.js
173–187

If we're catching what assert throws and replacing it with null, we can simplify it

const validatedKeys = deviceOlmOutboundKeysValidator.is(deviceKeys) ? validatedKeys : null;

but that would require adding some type annotations

This revision is now accepted and ready to land.Jan 29 2024, 1:04 AM