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)
Sat, Oct 19, 8:24 AM
Unknown Object (File)
Fri, Oct 18, 9:45 PM
Unknown Object (File)
Fri, Oct 18, 9:45 PM
Unknown Object (File)
Fri, Oct 18, 9:45 PM
Unknown Object (File)
Sun, Oct 6, 8:43 PM
Unknown Object (File)
Mon, Sep 30, 12:25 PM
Unknown Object (File)
Sep 26 2024, 8:32 PM
Unknown Object (File)
Sep 24 2024, 1:07 PM
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