From 31ca451464a1c19998d5068c97281721a7fd5da0 Mon Sep 17 00:00:00 2001 From: Mary Date: Fri, 19 Apr 2024 21:35:58 +0700 Subject: [PATCH] fix: blocking resumption should also use pds url --- src/state/session/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 074336cc96..72a7dfd662 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -410,13 +410,14 @@ export function Provider({children}: React.PropsWithChildren<{}>) { isSessionDeactivated(account.accessJwt) || account.deactivated, } + if (account.pdsUrl) { + agent.api.xrpc.uri = agent.pdsUrl = new URL(account.pdsUrl) + } + if (canReusePrevSession) { logger.debug(`session: attempting to reuse previous session`) agent.session = prevSession - if (account.pdsUrl) { - agent.api.xrpc.uri = agent.pdsUrl = new URL(account.pdsUrl) - } __globalAgent = agent upsertAccount(account)