Page MenuHomePhabricator

[lib] Broadcast account deletion message to peers
ClosedPublic

Authored by bartek on Jul 30 2024, 5:52 AM.
Tags
None
Referenced Files
F3205677: D12944.diff
Sun, Nov 10, 12:00 AM
F3201490: D12944.diff
Sat, Nov 9, 4:39 PM
Unknown Object (File)
Thu, Nov 7, 1:40 AM
Unknown Object (File)
Thu, Nov 7, 12:56 AM
Unknown Object (File)
Wed, Nov 6, 10:49 PM
Unknown Object (File)
Sat, Nov 2, 4:02 AM
Unknown Object (File)
Sat, Nov 2, 4:00 AM
Unknown Object (File)
Sat, Nov 2, 3:59 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