Port over new pdsUrl handling

This commit is contained in:
Eric Bailey
2024-04-25 14:52:56 -05:00
parent 13124e5676
commit 07d88e21fb
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -37,6 +37,7 @@ export function agentToSessionAccount(
deactivated: isSessionDeactivated(agent.session.accessJwt), deactivated: isSessionDeactivated(agent.session.accessJwt),
refreshJwt: agent.session.refreshJwt, refreshJwt: agent.session.refreshJwt,
accessJwt: agent.session.accessJwt, accessJwt: agent.session.accessJwt,
pdsUrl: agent.pdsUrl?.toString(),
} }
} }
+5
View File
@@ -263,6 +263,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
service: account.service, service: account.service,
}) })
// restore the correct PDS URL if available
if (account.pdsUrl) {
newAgent.pdsUrl = newAgent.api.xrpc.uri = new URL(account.pdsUrl)
}
const prevSession = { const prevSession = {
...account, ...account,
accessJwt: account.accessJwt || '', accessJwt: account.accessJwt || '',