Page MenuHomePhabricator

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

Authored by kamil on Mon, Jun 10, 8:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 28, 12:42 PM
Unknown Object (File)
Wed, Jun 26, 8:19 AM
Unknown Object (File)
Tue, Jun 25, 4:31 PM
Unknown Object (File)
Sat, Jun 22, 8:36 AM
Unknown Object (File)
Sat, Jun 22, 4:41 AM
Unknown Object (File)
Sat, Jun 22, 4:31 AM
Unknown Object (File)
Fri, Jun 21, 5:51 AM
Unknown Object (File)
Fri, Jun 21, 5:51 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.Mon, Jun 10, 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.Thu, Jun 13, 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)