Skip to content
Snippets Groups Projects
Commit 2d96f901 authored by Kegan Dougal's avatar Kegan Dougal
Browse files

Review comments

parent ec54c7cf
Branches kegan/search-on-mxid-and-displayname
Tags
No related merge requests found
......@@ -28,11 +28,11 @@ function isMatch(query, name, uid) {
}
// 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;
}
// split spaces in name and try matching constituient parts
// split spaces in name and try matching constituent parts
var parts = name.split(" ");
for (var i = 0; i < parts.length; i++) {
if (parts[i].indexOf(query) === 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment