Add isSelfHosted to SessionAccount
This commit is contained in:
@@ -28,6 +28,7 @@ const accountSchema = z.object({
|
||||
*/
|
||||
status: z.string().optional(),
|
||||
pdsUrl: z.string().optional(),
|
||||
isSelfHosted: z.boolean().optional(),
|
||||
})
|
||||
export type PersistedAccount = z.infer<typeof accountSchema>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import {TID} from '@atproto/common-web'
|
||||
|
||||
import {networkRetry} from '#/lib/async/retry'
|
||||
import {
|
||||
BSKY_SERVICE,
|
||||
DISCOVER_SAVED_FEED,
|
||||
IS_PROD_SERVICE,
|
||||
PUBLIC_BSKY_SERVICE,
|
||||
@@ -204,6 +205,7 @@ export function agentToSessionAccount(
|
||||
active: agent.session.active,
|
||||
status: agent.session.status as SessionAccount['status'],
|
||||
pdsUrl: agent.pdsUrl?.toString(),
|
||||
isSelfHosted: !agent.serviceUrl.toString().startsWith(BSKY_SERVICE),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user