fix: Account lookup fails with 404

This commit is contained in:
Marcel Hellkamp 2023-08-07 16:20:35 +02:00
parent e78305b556
commit 3d2cdb0fcc

View File

@ -124,7 +124,7 @@ async function getLocalUser(user: string, domain: string): Promise<any> {
if (!Object.hasOwnProperty.call(accountCache, key)) {
try {
accountCache[key] = (await fetchJson(domain, "v1/accounts/lookup", { acct: user })) as MastodonAccount
accountCache[key] = (await fetchJson(domain, "api/v1/accounts/lookup", { acct: user })) as MastodonAccount
} catch (e) {
if ((e as any).status === 404)
accountCache[key] = null;