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
Unknown Object (File)
Fri, Nov 15, 10:06 AM
Unknown Object (File)
Fri, Nov 8, 1:24 AM
Unknown Object (File)
Sun, Nov 3, 7:09 AM
Unknown Object (File)
Oct 18 2024, 12:53 AM
Unknown Object (File)
Oct 18 2024, 12:53 AM
Unknown Object (File)
Oct 18 2024, 12:53 AM
Unknown Object (File)
Oct 18 2024, 12:53 AM
Unknown Object (File)
Oct 18 2024, 12:53 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