Page MenuHomePhabricator

[lib] refactor processing server requests in `UserStore` to ops
ClosedPublic

Authored by kamil on Nov 9 2023, 6:18 AM.
Tags
None
Referenced Files
F3177257: D9800.diff
Thu, Nov 7, 10:47 PM
Unknown Object (File)
Sun, Oct 27, 5:22 PM
Unknown Object (File)
Wed, Oct 23, 2:43 AM
Unknown Object (File)
Wed, Oct 23, 2:41 AM
Unknown Object (File)
Mon, Oct 21, 4:27 AM
Unknown Object (File)
Fri, Oct 18, 2:55 PM
Unknown Object (File)
Fri, Oct 18, 9:56 AM
Unknown Object (File)
Fri, Oct 18, 8:17 AM
Subscribers

Details

Summary

Convert logic for ops approach.

Depends on D9799

Test Plan
  1. Update sessionCheckFrequency to lower value
  2. Update some users directly in database
  3. Delete some users from database

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Nov 10 2023, 1:54 AM
tomek added inline comments.
lib/reducers/user-reducer.js
280 ↗(On Diff #33011)

Why do we spread userInfo?

This revision is now accepted and ready to land.Nov 13 2023, 6:42 AM
lib/reducers/user-reducer.js
280 ↗(On Diff #33011)

It's because here userInfo is of type AccountUserInfo, but the payload is UserInfo - the types are almost the same, AccountUserInfo is more specific that's why with spread it works.

The only difference is +username: ?string, in UserInfo vs +username: string, in AccountUserInfo.