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
F2174084: D10750.id36210.diff
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
Unknown Object (File)
Mon, Jul 1, 11:37 AM
Unknown Object (File)
Mon, Jul 1, 11:37 AM
Unknown Object (File)
Sun, Jun 30, 7:16 AM
Unknown Object (File)
Fri, Jun 21, 7:30 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #36210)

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 ↗(On Diff #36210)

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