fix: distinguish aliases from ambuigity filter
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ function fuzzyNameMatch<T extends { avatar: BaseAvatar }>(
|
|||||||
.sort((a, b) => b.score - a.score);
|
.sort((a, b) => b.score - a.score);
|
||||||
|
|
||||||
const best = ranked[0];
|
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 (!best || best.score < 0.72) return undefined;
|
||||||
if (second && best.score - second.score < 0.08) return undefined;
|
if (second && best.score - second.score < 0.08) return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user