Page MenuHomePhabricator

[lib] standarize broadcasting device list update when removing device
ClosedPublic

Authored by kamil on Nov 20 2024, 3:05 AM.
Tags
None
Referenced Files
F3513493: D13972.id45894.diff
Sun, Dec 22, 12:25 AM
F3513441: D13972.id.diff
Sun, Dec 22, 12:24 AM
F3513429: D13972.diff
Sun, Dec 22, 12:24 AM
Unknown Object (File)
Mon, Dec 16, 3:35 PM
Unknown Object (File)
Mon, Dec 16, 11:33 AM
Unknown Object (File)
Mon, Dec 16, 2:42 AM
Unknown Object (File)
Mon, Dec 16, 2:42 AM
Unknown Object (File)
Sun, Dec 15, 8:07 PM
Subscribers

Details

Summary

Addressing https://phab.comm.dev/D13963#inline-78590 and https://phab.comm.dev/D13963#inline-78595.

Right now we have the same approach each time:

  1. Sending device list updates to all our peers
  2. Sending device list updates to all our devices that are on the device list, but without the primary device
  3. Call getAndUpdateDeviceListsForUsers for our userID
    • update AuxUserStore
    • get platform details if the device was added

Depends on D13963

Test Plan

Remove secondary device and test if other peers received 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 published this revision for review.Nov 20 2024, 3:10 AM
kamil edited the summary of this revision. (Show Details)
lib/shared/device-list-utils.js
345 ↗(On Diff #45894)

We could consider extracting this outside the if branches since it's shared across all branches

356 ↗(On Diff #45894)

Same with this line

This revision is now accepted and ready to land.Nov 20 2024, 4:23 AM