Remove diacritics from fuse.js search term

This commit is contained in:
Fedor Indutny 2024-04-11 00:02:59 +02:00 committed by GitHub
parent ddb201b9ae
commit da34ce5fe7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@ import { WEEK } from './durations';
import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse';
import { countConversationUnreadStats, hasUnread } from './countUnreadStats';
import { getE164 } from './getE164';
import { removeDiacritics } from './removeDiacritics';
// Fuse.js scores have order of 0.01
const ACTIVE_AT_SCORE_FACTOR = (1 / WEEK) * 0.01;
@ -116,7 +117,7 @@ function searchConversations(
});
// Escape the search term
let extendedSearchTerm = searchTerm;
let extendedSearchTerm = removeDiacritics(searchTerm);
// OR phoneNumber
if (phoneNumber) {