HomePhabricator
Diffusion Comm faeec0cee2c7

[lib] Make resolveKeyserverSessionInvalidation generic

Description

[lib] Make resolveKeyserverSessionInvalidation generic

Summary:
This diff factors out the "business logic" in resolveKeyserverSessionInvalidation, making it possible to use the function with the new identity service-based keyserver auth.

SQLiteDataHandler on native is the only callsite that remains outside of KeyserverConnectionHandler. It needs to remain special-cased because SQLiteDataHandler does its work before KeyserverConnectionHandler is rendered, since KeyserverConnectionHandler depends on data being loaded into Redux. In a later diff I'll address how SQLiteDataHandler will work in the multi-keyserver world, but the short story is that it will need to re-load data from the backup service rather than from the authoritative keyserver.

NOTE: The recovery logic in SQLiteDataHandler is broken here because it doesn't directly dispatch setNewSession. This was broken in D10952, and will be fixed in a later diff. I decided not to fix this up earlier because it would require introducing code that would later be ripped out.

Depends on D11224

Test Plan: I used this test plan for the whole stack: https://gist.github.com/Ashoat/75ab690d5c53cdd68a51b02e03e27c58

Reviewers: inka, tomek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D11225

Details

Provenance
ashoatAuthored on Feb 13 2024, 1:19 PM
Reviewer
tomek
Differential Revision
D11225: [lib] Make resolveKeyserverSessionInvalidation generic
Parents
rCOMM304bee8cd1aa: [lib][native] Deprecate DispatchRecoveryAttempt in favor of…
Branches
Unknown
Tags
Unknown