Skip to content

Commit

Permalink
[lib] update currentAsOf for SIWE auth
Browse files Browse the repository at this point in the history
Summary:
Updating this to have correct [type](https://github.com/CommE2E/comm/blob/4737cce6f2e643073bfe27ab42f8cc7bab12593f/lib/types/message-types.js#L647).

This partially caused [ENG-5883](https://linear.app/comm/issue/ENG-5883/rahul-sees-socket-crash-loop-due-to-policy-acceptance-issue).
We were returning `0` as the default value for `currentAsOf` in here: [link](https://github.com/CommE2E/comm/blob/371f6f808e5e8c44fb4b175081b0b1624225ff55/lib/selectors/keyserver-selectors.js#L57).
This later caused a condition from D9965 truthy right after login.

Test Plan:
1. Log `currentAsOf`
2. Log in using SIWE
3. Make sure it has correct type and value (previously it was number, not object).

Reviewers: inka, tomek, michal, ashoat

Reviewed By: ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D10058
  • Loading branch information
xsanm committed Nov 27, 2023
1 parent 1bb4d11 commit ef15fb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/actions/siwe-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const siweAuth =
messageInfos: response.rawMessageInfos,
truncationStatus: response.truncationStatuses,
watchedIDsAtRequestTime: watchedIDs,
currentAsOf: response.serverTime,
currentAsOf: { [ashoatKeyserverID]: response.serverTime },
},
userInfos,
updatesCurrentAsOf: response.serverTime,
Expand Down

0 comments on commit ef15fb4

Please sign in to comment.