Page MenuHomePhabricator

[keyserver][lib][native][web] Refactor currentAsOf field in messageStore
ClosedPublic

Authored by inka on Aug 4 2023, 6:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 30, 1:11 PM
Unknown Object (File)
Thu, Jun 27, 5:00 AM
Unknown Object (File)
Tue, Jun 25, 3:43 PM
Unknown Object (File)
Mon, Jun 24, 9:03 AM
Unknown Object (File)
Fri, Jun 21, 2:19 AM
Unknown Object (File)
Wed, Jun 19, 5:08 PM
Unknown Object (File)
Wed, Jun 19, 11:22 AM
Unknown Object (File)
Wed, Jun 19, 11:22 AM
Subscribers

Details

Summary

issue: https://linear.app/comm/issue/ENG-4461/refactor-currentasof-field-in-message-store
currentAsOf is a timestamp. The client claims to have all messages that are interesting to it up until this point in time. It the socket needs to be re-initialiezed, it uses this value in the initial message to the server, to fetch
messages that came after. It is updated when the user logs in or recievies more messages. In the second case it is updated to the timestamp of the newest message the client has ever seen. So it makes sense to leave currentAsOf in
messageStore, because it is inferred from the value of messageStore when it updates.

Test Plan

Ran yarn flow-all. Tested that the migration on native works correctly. Checked that no errors are thrown from validators when web app is opened.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Aug 4 2023, 6:47 AM

Accepting although I wonder how hard it would be to put this into the keyserverStore (during backup creation we want to save all keyserver-related information and now instead of having it all in one places it's split between two fields in redux)

This revision is now accepted and ready to land.Aug 16 2023, 1:35 AM

Accepting although I wonder how hard it would be to put this into the keyserverStore (during backup creation we want to save all keyserver-related information and now instead of having it all in one places it's split between two fields in redux)

Me, @michal and @kamil discussed this, and came to the conclusion that we shouldn't do this for now. And if we need it in the future, it won't be a big problem to change it