fix: blocking resumption should also use pds url

This commit is contained in:
Mary
2024-04-19 21:35:58 +07:00
parent 5a7405cae1
commit 31ca451464
+4 -3
View File
@@ -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)