[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;
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 cached = cache.find(r => r.username.toLowerCase() === username.toLowerCase() && r.host === host);