Page MenuHomePhabricator

[keyserver][lib] Update freshMessageStore to return currentAsOf for all keyservers
ClosedPublic

Authored by inka on Nov 14 2023, 2:18 AM.
Tags
None
Referenced Files
F2902835: D9879.diff
Sat, Oct 5, 7:15 PM
Unknown Object (File)
Sat, Sep 28, 3:23 AM
Unknown Object (File)
Sat, Sep 28, 3:23 AM
Unknown Object (File)
Sat, Sep 28, 3:22 AM
Unknown Object (File)
Sat, Sep 28, 3:19 AM
Unknown Object (File)
Sun, Sep 22, 4:37 PM
Unknown Object (File)
Aug 27 2024, 6:28 PM
Unknown Object (File)
Aug 27 2024, 6:28 PM
Subscribers

Details

Summary

issue: https://linear.app/comm/issue/ENG-5722/update-freshmessagestore-function
freshMessageStore should return currentAsOf for all keyservers

Test Plan

Tested that after the setInitialReduxState action the currentAsOf field is correct - a "map" from keyserver id to number.
This tests this function, because freshMessageStore is called by the keyserver in getInitialReduxStateResponder which returns the initial state. The states from all keyservers are then merged in getInitialReduxState, and the returnd value is dispatched with setInitialReduxState action.
I also logged to the console the value returned from freshMessageStore in getInitialReduxStateResponder and checked that it is correct.
I also logged in and checked that the currentAsOf in messageStore is correct after logInActionTypes.success

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Nov 14 2023, 2:38 AM
This revision is now accepted and ready to land.Nov 14 2023, 7:04 AM
keyserver/src/responders/redux-state-responders.js
171

For future reference, the new Flow requires an annotation here

keyserver/src/responders/redux-state-responders.js
171

Actually, hmmm... I guess this isn't always required, as I'm not seeing any errors after rebasing. Sorry for the distraction!