Page MenuHomePhabricator

[lib] refactor deleting keyserver account `keyserver-reducer` to ops
ClosedPublic

Authored by kamil on Jan 31 2024, 5:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 6:01 AM
Unknown Object (File)
Wed, Nov 6, 6:48 PM
Unknown Object (File)
Oct 15 2024, 7:32 AM
Unknown Object (File)
Oct 15 2024, 7:32 AM
Unknown Object (File)
Oct 15 2024, 7:32 AM
Unknown Object (File)
Oct 15 2024, 7:32 AM
Unknown Object (File)
Oct 15 2024, 7:32 AM
Unknown Object (File)
Oct 15 2024, 7:32 AM
Subscribers

Details

Summary

Convert logic to ops approach.

Depends on D10772

Test Plan

Run keyserver-reducer.test.js

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jan 31 2024, 5:53 AM
inka requested changes to this revision.Jan 31 2024, 6:15 AM
inka added inline comments.
lib/reducers/keyserver-reducer.js
430 ↗(On Diff #36381)

You want to check if action.payload.keyserverIDs includes ashoatKeyserverID.
The logic is that this action has in action.payload.keyserverIDs ids of keyservers the user is disconnecting from. We want to remove them from the store, with the exception of Ashoat's keyserver, which has to be in the store at all times. So if Ashoat's keyserver is included in action.payload.keyserverIDs, we just want to clear some fields for it.

For the record, state.keyserverInfos should always include and entry for ashoatKeyserverID (until we have real DMs)

This revision now requires changes to proceed.Jan 31 2024, 6:15 AM

It would be great if you could also check if running this action with Ashoat's id in payload resets Ashoat's keyserver correctly - this is not included in keyserver-reducer.test.js

Also, what does thread-activity-reducer.test.js have to do with this?

This revision is now accepted and ready to land.Jan 31 2024, 7:37 AM
This revision was landed with ongoing or failed builds.Jan 31 2024, 8:23 AM
This revision was automatically updated to reflect the committed changes.