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)
Sun, Sep 15, 12:21 PM
Unknown Object (File)
Wed, Sep 11, 4:53 PM
Unknown Object (File)
Mon, Sep 9, 4:47 PM
Unknown Object (File)
Sat, Sep 7, 11:06 AM
Unknown Object (File)
Sat, Sep 7, 11:04 AM
Unknown Object (File)
Fri, Sep 6, 11:52 PM
Unknown Object (File)
Thu, Sep 5, 4:42 PM
Unknown Object (File)
Thu, Sep 5, 4:42 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
No Lint Coverage
Unit
No Test Coverage

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

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

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

183–220

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

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 ↗(On Diff #43104)

This feedback was not addressed