Page MenuHomePhabricator

[lib] Broadcast account deletion message to peers
ClosedPublic

Authored by bartek on Jul 30 2024, 5:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 10:36 PM
Unknown Object (File)
Mon, Dec 16, 9:40 PM
Unknown Object (File)
Mon, Dec 16, 9:40 PM
Unknown Object (File)
Mon, Dec 16, 9:40 PM
Unknown Object (File)
Mon, Dec 16, 9:39 PM
Unknown Object (File)
Mon, Dec 2, 7:14 PM
Unknown Object (File)
Nov 24 2024, 11:48 AM
Unknown Object (File)
Nov 22 2024, 12:30 AM
Subscribers

Details

Summary

Address ENG-8605.

  • Created a hook to easily broadcast deletion message.

In useDeleteAccount hook, added a call to the hook before calling Identity.

Depends on D12943

Test Plan

Tested together with D12945.
Deleted account when having device list with a secondary device and a peer in auxUserStore. Verified that both peer and my device received the ACCOUNT_DELETION message.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 1 2024, 2:01 AM

Improvements to useBroadcastAccountDeletion hook

lib/actions/user-actions.js
536–537 ↗(On Diff #43066)

This is because of Flow not being able to infer these as non-null after await broadcastAccountDeletion(); was called

kamil added inline comments.
lib/hooks/peer-list-hooks.js
180–182 ↗(On Diff #43066)

Thinking that we should prioritize this: ENG-8192 to avoid remembering about this each time.

183–220 ↗(On Diff #43066)

I think this is some code duplication, can be extracted to a separate hook to reuse this each time. Can be done as a follow-up.

144 ↗(On Diff #42964)
This revision is now accepted and ready to land.Aug 5 2024, 4:33 AM
lib/hooks/peer-list-hooks.js
183–220 ↗(On Diff #43066)

I'll address this in a separate diff

This revision was landed with ongoing or failed builds.Aug 5 2024, 5:54 AM
This revision was automatically updated to reflect the committed changes.
lib/hooks/peer-list-hooks.js
149

This feedback was not addressed