Post session info to service worker instead of asking from sw (#2605)

post session info to service worker instead of asking from sw on each request
This commit is contained in:
Ajay Bura
2026-02-14 11:41:36 +05:30
committed by GitHub
parent 206a927f30
commit 074c555294
5 changed files with 84 additions and 42 deletions

View File

@@ -2,6 +2,7 @@ import { createClient, MatrixClient, IndexedDBStore, IndexedDBCryptoStore } from
import { cryptoCallbacks } from './secretStorageKeys';
import { clearNavToActivePathStore } from '../app/state/navToActivePath';
import { pushSessionToSW } from '../sw-session';
type Session = {
baseUrl: string;
@@ -53,6 +54,7 @@ export const clearCacheAndReload = async (mx: MatrixClient) => {
};
export const logoutClient = async (mx: MatrixClient) => {
pushSessionToSW();
mx.stopClient();
try {
await mx.logout();