mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 02:09:05 +01:00
[backend] Fix mention host fallback
This commit is contained in:
parent
1351fb686a
commit
8b699248af
@ -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 New Issue
Block a user