mirror of
https://github.com/defnull/fediwall.git
synced 2024-11-25 00:53:15 +01:00
fix: Account lookup fails with 404
This commit is contained in:
parent
e78305b556
commit
3d2cdb0fcc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user