filterAndSortContacts should tokenize
This commit is contained in:
parent
05ea4a4ff8
commit
6f7ecb141f
2 changed files with 3 additions and 1 deletions
|
@ -551,7 +551,8 @@ describe('both/state/selectors/conversations', () => {
|
|||
const result = getComposeContacts(state);
|
||||
|
||||
const ids = result.map(contact => contact.id);
|
||||
assert.deepEqual(ids, ['convo-1', 'convo-5']);
|
||||
// NOTE: convo-6 matches because you can't write "Sharing" without "in"
|
||||
assert.deepEqual(ids, ['convo-1', 'convo-5', 'convo-6']);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ const FUSE_OPTIONS: FuseOptions<ConversationType> = {
|
|||
// A small-but-nonzero threshold lets us match parts of E164s better, and makes the
|
||||
// search a little more forgiving.
|
||||
threshold: 0.05,
|
||||
tokenize: true,
|
||||
keys: [
|
||||
{
|
||||
name: 'title',
|
||||
|
|
Loading…
Reference in a new issue