Page MenuHomePhabricator

[native] Broadcast device list update and send backup key stub
ClosedPublic

Authored by bartek on Mar 11 2024, 6:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 5:58 AM
Unknown Object (File)
Thu, Apr 25, 8:38 AM
Unknown Object (File)
Thu, Apr 25, 8:37 AM
Unknown Object (File)
Thu, Apr 25, 8:37 AM
Unknown Object (File)
Thu, Apr 25, 8:37 AM
Unknown Object (File)
Thu, Apr 25, 8:37 AM
Unknown Object (File)
Thu, Apr 25, 7:23 AM
Unknown Object (File)
Tue, Apr 16, 10:30 AM
Subscribers

Details

Summary

Primary device should broadcast the device list update to all peers. However, we don't have peer syncing yet, so as a stub, it only broadcasts it to all devices from its device list.
Also, stubbed message containing backup data key, which will be needed for backup restore on secondary device.

Depends on D11296

Test Plan

Added a few devices to the device list - made sure that after successful QR auth flow, all devices receive the device list update. Also, secondary device displays a console log with stub backup key.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek edited the test plan for this revision. (Show Details)
bartek published this revision for review.Mar 12 2024, 2:20 AM
native/profile/secondary-device-qr-code-scanner.react.js
62 ↗(On Diff #38016)

Should we add an invariant here that deviceLists.length > 0?

native/qr-code/qr-code-screen.react.js
103 ↗(On Diff #38016)

Is this console.log left over from debugging?

kamil requested changes to this revision.Mar 13 2024, 6:03 AM
kamil added inline comments.
lib/types/tunnelbroker/peer-to-peer-message-types.js
26 ↗(On Diff #38016)

We should discuss whether this update should be sent encrypted via olm and create a task to add it in the future, then this also should be sent as subtype of ENCRYPTED_MESSAGE

This revision now requires changes to proceed.Mar 13 2024, 6:03 AM
lib/types/tunnelbroker/peer-to-peer-message-types.js
26 ↗(On Diff #38016)

Yes, good point, I was thinking about this too.
I'm not sure if it's possible at this moment, so I created https://linear.app/comm/issue/ENG-7245/broadcast-device-list-updates-via-olm-sessions to address this

native/qr-code/qr-code-screen.react.js
103 ↗(On Diff #38016)

It is replaced by actual backup restore call later in the stack

This revision is now accepted and ready to land.Mar 18 2024, 6:42 AM