Page MenuHomePhabricator

[lib] broadcast updates when becoming aware of new device existence
ClosedPublic

Authored by kamil on Jun 10 2024, 8:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 11:44 PM
Unknown Object (File)
Tue, Oct 22, 1:16 PM
Unknown Object (File)
Tue, Oct 22, 9:04 AM
Unknown Object (File)
Tue, Oct 22, 8:34 AM
Unknown Object (File)
Sep 25 2024, 10:49 PM
Unknown Object (File)
Sep 25 2024, 10:49 PM
Unknown Object (File)
Sep 16 2024, 7:59 AM
Unknown Object (File)
Sep 15 2024, 8:28 AM
Subscribers

Details

Summary

This handles two cases:

  1. Login - this logic will be executed on the device logged in using legacy Identity auth notifying other peers.
  2. Whenever becoming aware of another user - ping him to fetch our newest device list.

Note: This code will be removed in the future after fully launching secondary device auth.

Depends on D12379

Test Plan
  1. Run local TB, and Identity, and make all clients connect to it.
  2. usingCommServicesAccessToken = true
  3. Login on multiple devices (2 devices of user A, 1 device of user B but A is aware of B).
  4. Login on a new device of user B.
  5. All A's and B's devices should receive a device list update.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

This is to handle Legacy Identity auth and should be removed

kamil published this revision for review.Jun 10 2024, 9:52 AM
tomek added inline comments.
lib/hooks/peer-list-hooks.js
109 ↗(On Diff #41168)

There might be multiple "own" devices. Maybe rename it?

This revision is now accepted and ready to land.Jun 13 2024, 3:38 AM

ownDeviceID -> thisDeviceID

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

What did you mean by "should be removed"? Like should be removed at some point in the future? Or should be removed before landing? (It doesn't appear to have been removed before landing)

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

Should be removed when we sunset legacy identity auth

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

Got it. Are we tracking this anywhere on Linear?

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)