fix: account server in GoToSocial

This commit is contained in:
三咲智子 Kevin Deng 2023-01-15 17:44:36 +08:00
parent ba5b89d5b8
commit 5247b36b6d
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
4 changed files with 14 additions and 6 deletions

View file

@ -43,7 +43,7 @@ export function fetchAccountById(id?: string | null): Promise<mastodon.v1.Accoun
const cached = cache.get(key)
if (cached)
return cached
const domain = currentInstance.value?.uri
const domain = currentInstance.value ? getInstanceDomain(currentInstance.value) : null
const promise = useMastoClient().v1.accounts.fetch(id)
.then((r) => {
if (r.acct && !r.acct.includes('@') && domain)
@ -63,7 +63,7 @@ export async function fetchAccountByHandle(acct: string): Promise<mastodon.v1.Ac
const cached = cache.get(key)
if (cached)
return cached
const domain = currentInstance.value?.uri
const domain = currentInstance.value ? getInstanceDomain(currentInstance.value) : undefined
async function lookupAccount() {
const client = useMastoClient()