Port over new pdsUrl handling
This commit is contained in:
@@ -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(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 || '',
|
||||||
|
|||||||
Reference in New Issue
Block a user