You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-25 17:02:04 +03:00
Review comments
This commit is contained in:
@ -28,11 +28,11 @@ function isMatch(query, name, uid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// strip @ on uid and try matching again
|
// strip @ on uid and try matching again
|
||||||
if (uid.length > 1 && uid.substring(1).indexOf(query) === 0) {
|
if (uid.length > 1 && uid[0] === "@" && uid.substring(1).indexOf(query) === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// split spaces in name and try matching constituient parts
|
// split spaces in name and try matching constituent parts
|
||||||
var parts = name.split(" ");
|
var parts = name.split(" ");
|
||||||
for (var i = 0; i < parts.length; i++) {
|
for (var i = 0; i < parts.length; i++) {
|
||||||
if (parts[i].indexOf(query) === 0) {
|
if (parts[i].indexOf(query) === 0) {
|
||||||
|
Reference in New Issue
Block a user