mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
[backend] Fix mention host fallback
This commit is contained in:
parent
1351fb686a
commit
8b699248af
1 changed files with 1 additions and 1 deletions
|
@ -221,7 +221,7 @@ export async function resolveMentionFromCache(username: string, host: string | n
|
|||
}
|
||||
|
||||
const fallback = getMentionFallbackUri(username, host, objectHost);
|
||||
const cached = cache.find(r => r.username.toLowerCase() === username.toLowerCase() && r.host === host);
|
||||
const cached = cache.find(r => r.username.toLowerCase() === username.toLowerCase() && r.host === (host ?? objectHost));
|
||||
const href = cached?.url ?? cached?.uri;
|
||||
if (cached && href != null) return { username: cached.username, href: href };
|
||||
if (isLocal) return { username: username, href: fallback };
|
||||
|
|
Loading…
Reference in a new issue