[backend] Clean up unnecessary code in resolve-user

This commit is contained in:
Laura Hausmann 2023-10-18 00:09:53 +02:00
parent 998bb1ae08
commit d42a1eeb63
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -219,11 +219,6 @@ export async function resolveMentionFromCache(username: string, host: string | n
if (finalUsername === null) return null; if (finalUsername === null) return null;
username = finalUsername; username = finalUsername;
} }
try {
if (isLocal) username = await resolveUser(username, null).then(p => p?.username ?? username);
} catch {
return null;
}
const fallback = getMentionFallbackUri(username, host, objectHost); 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);