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
Unknown Object (File)
Fri, Jul 5, 7:18 AM
Unknown Object (File)
Wed, Jul 3, 12:02 AM
Unknown Object (File)
Sun, Jun 30, 7:48 PM
Unknown Object (File)
Sun, Jun 30, 7:35 PM
Unknown Object (File)
Sun, Jun 30, 1:29 PM
Unknown Object (File)
Sat, Jun 22, 10:54 PM
Unknown Object (File)
Fri, Jun 14, 3:35 AM
Unknown Object (File)
Jun 7 2024, 5:20 AM
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!