fix: distinguish aliases from ambuigity filter

This commit is contained in:
2026-05-04 23:26:17 +07:00 Unverified
parent 69a2ac9f90
commit 57296794a3
+1 -1
View File
@@ -51,7 +51,7 @@ function fuzzyNameMatch<T extends { avatar: BaseAvatar }>(
.sort((a, b) => b.score - a.score);
const best = ranked[0];
const second = ranked[1];
const second = ranked.find((x) => x.entry !== best?.entry);
if (!best || best.score < 0.72) return undefined;
if (second && best.score - second.score < 0.08) return undefined;