Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[native] Use recovery callServerEndpoint when fetching notif keys in …
…resolveInvalidatedCookie Summary: This resolves [ENG-5410](https://linear.app/comm/issue/ENG-5410/resolution-attempt-triggers-second-resolution-attempt). The version of `callServerEndpoint` that `resolveInvalidatedCookie` gets passed is defined [here](https://github.com/CommE2E/comm/blob/007502788f0ce66b602f27038106baf83236bfdb/lib/utils/action-utils.js#L192-L231). Instead of trying to dispatch a recovery attempt when it sees a session change that invalidates its cookie, this version of `callServerEndpoint` ignores the session change. That solves the "double resolution" issue. It's also the right thing to use here... this overriden `callServerEndpoint` is used by the `logIn` action, and should be used by all other actions during the recovery attempt. Depends on D9584 Test Plan: I used [this](https://gist.github.com/Ashoat/712e7d1e9aaee825dd8b4c6871b8a7d3) patch to test. Before this diff, logs showed the first recovery attempt triggering a second one. After this diff, there was only one recovery attempt, and the `initialNotificationsEncryptedMessage` was resolved correctly. Reviewers: marcin, atul Reviewed By: atul Subscribers: tomek, wyilio Differential Revision: https://phab.comm.dev/D9585
- Loading branch information