From 02dc687705c2845567117acece27941d81423cf6 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 11 Sep 2023 23:20:41 +0200 Subject: [PATCH] Fallback to acct webfinger on getSubjectHostFromUriAndUsernameCached --- packages/backend/src/remote/resolve-user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/resolve-user.ts b/packages/backend/src/remote/resolve-user.ts index 0411aae93..2f0c6008e 100644 --- a/packages/backend/src/remote/resolve-user.ts +++ b/packages/backend/src/remote/resolve-user.ts @@ -203,7 +203,7 @@ export async function getSubjectHostFromUriAndUsernameCached(uri: string, userna host: hostname }); - return user ? user.host : await uriHostCache.fetch(uri, async () => await getSubjectHostFromUri(uri) ?? hostname); + return user ? user.host : await uriHostCache.fetch(uri, async () => await getSubjectHostFromUri(uri) ?? await getSubjectHostFromAcctParts(username, hostname) ?? hostname); } export async function getSubjectHostFromAcct(acct: string): Promise {