1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-24 06:02:08 +03:00

Only match users by matchgin displayname or user ID prefixes

Because tab completing "k" probably shouldn't give you "luke"

Fixes https://github.com/vector-im/riot-web/issues/4495
This commit is contained in:
Luke Barnard
2017-07-04 16:24:59 +01:00
parent 2e95f5871c
commit 6a80875c01
2 changed files with 10 additions and 3 deletions

View File

@ -37,10 +37,11 @@ export default class UserProvider extends AutocompleteProvider {
constructor() {
super(USER_REGEX, {
keys: ['name', 'userId'],
keys: ['name'],
});
this.matcher = new FuzzyMatcher([], {
keys: ['name', 'userId'],
keys: ['name'],
shouldMatchPrefix: true,
});
}