{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/comments/195366054","pull_request_review_id":128719332,"id":195366054,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTM2NjA1NA==","diff_hunk":"@@ -105,8 +105,15 @@ var RoomSubList = React.createClass({\n \n     applySearchFilter: function(list, filter) {\n         if (filter === \"\") return list;\n+        const lcFilter = filter.toLowerCase();\n         return list.filter((room) => {\n-            return room.name && room.name.toLowerCase().indexOf(filter.toLowerCase()) >= 0\n+            if (room.name && room.name.toLowerCase().includes(lcFilter)) return true;\n+            // only apply search filter to aliases if it looks like an alias (starts with `#`)\n+            // to prevent loads of false positives with server names, e.g `matrix`","path":"src/components/structures/RoomSubList.js","position":9,"original_position":9,"commit_id":"41be46a7120075b5792194bcdf2c56f6e9b240fa","original_commit_id":"41be46a7120075b5792194bcdf2c56f6e9b240fa","user":{"login":"t3chguy","id":2403652,"node_id":"MDQ6VXNlcjI0MDM2NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/2403652?v=4","gravatar_id":"","url":"https://api.github.com/users/t3chguy","html_url":"https://github.com/t3chguy","followers_url":"https://api.github.com/users/t3chguy/followers","following_url":"https://api.github.com/users/t3chguy/following{/other_user}","gists_url":"https://api.github.com/users/t3chguy/gists{/gist_id}","starred_url":"https://api.github.com/users/t3chguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3chguy/subscriptions","organizations_url":"https://api.github.com/users/t3chguy/orgs","repos_url":"https://api.github.com/users/t3chguy/repos","events_url":"https://api.github.com/users/t3chguy/events{/privacy}","received_events_url":"https://api.github.com/users/t3chguy/received_events","type":"User","site_admin":false},"body":"It used to be `.includes` like the above then I switched it when I added the startsWith# as we know it's start-anchored ","created_at":"2018-06-14T10:00:58Z","updated_at":"2018-06-14T10:00:58Z","html_url":"https://github.com/matrix-org/matrix-react-sdk/pull/1957#discussion_r195366054","pull_request_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/comments/195366054"},"html":{"href":"https://github.com/matrix-org/matrix-react-sdk/pull/1957#discussion_r195366054"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957"}},"in_reply_to_id":195358620},"pull_request":{"url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957","id":194513686,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTEzNjg2","html_url":"https://github.com/matrix-org/matrix-react-sdk/pull/1957","diff_url":"https://github.com/matrix-org/matrix-react-sdk/pull/1957.diff","patch_url":"https://github.com/matrix-org/matrix-react-sdk/pull/1957.patch","issue_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/1957","number":1957,"state":"open","locked":false,"title":"apply roomlist searchFilter to aliases if it begins with a `#`","user":{"login":"t3chguy","id":2403652,"node_id":"MDQ6VXNlcjI0MDM2NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/2403652?v=4","gravatar_id":"","url":"https://api.github.com/users/t3chguy","html_url":"https://github.com/t3chguy","followers_url":"https://api.github.com/users/t3chguy/followers","following_url":"https://api.github.com/users/t3chguy/following{/other_user}","gists_url":"https://api.github.com/users/t3chguy/gists{/gist_id}","starred_url":"https://api.github.com/users/t3chguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3chguy/subscriptions","organizations_url":"https://api.github.com/users/t3chguy/orgs","repos_url":"https://api.github.com/users/t3chguy/repos","events_url":"https://api.github.com/users/t3chguy/events{/privacy}","received_events_url":"https://api.github.com/users/t3chguy/received_events","type":"User","site_admin":false},"body":"# Fixes https://github.com/vector-im/riot-web/issues/5719\r\n\r\napplies only if begins with a `#` otherwise yielded too many false positives when searching for `matrix`\r\n\r\nSigned-off-by: Michael Telatynski <7t3chguy@gmail.com>","created_at":"2018-06-13T08:53:37Z","updated_at":"2018-06-14T10:00:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d7494427f000765e07c429b72c32418d764df34","assignee":{"login":"t3chguy","id":2403652,"node_id":"MDQ6VXNlcjI0MDM2NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/2403652?v=4","gravatar_id":"","url":"https://api.github.com/users/t3chguy","html_url":"https://github.com/t3chguy","followers_url":"https://api.github.com/users/t3chguy/followers","following_url":"https://api.github.com/users/t3chguy/following{/other_user}","gists_url":"https://api.github.com/users/t3chguy/gists{/gist_id}","starred_url":"https://api.github.com/users/t3chguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3chguy/subscriptions","organizations_url":"https://api.github.com/users/t3chguy/orgs","repos_url":"https://api.github.com/users/t3chguy/repos","events_url":"https://api.github.com/users/t3chguy/events{/privacy}","received_events_url":"https://api.github.com/users/t3chguy/received_events","type":"User","site_admin":false},"assignees":[{"login":"t3chguy","id":2403652,"node_id":"MDQ6VXNlcjI0MDM2NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/2403652?v=4","gravatar_id":"","url":"https://api.github.com/users/t3chguy","html_url":"https://github.com/t3chguy","followers_url":"https://api.github.com/users/t3chguy/followers","following_url":"https://api.github.com/users/t3chguy/following{/other_user}","gists_url":"https://api.github.com/users/t3chguy/gists{/gist_id}","starred_url":"https://api.github.com/users/t3chguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3chguy/subscriptions","organizations_url":"https://api.github.com/users/t3chguy/orgs","repos_url":"https://api.github.com/users/t3chguy/repos","events_url":"https://api.github.com/users/t3chguy/events{/privacy}","received_events_url":"https://api.github.com/users/t3chguy/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957/commits","review_comments_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957/comments","review_comment_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/1957/comments","statuses_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/41be46a7120075b5792194bcdf2c56f6e9b240fa","head":{"label":"matrix-org:t3chguy/roomsublist_search_aliases","ref":"t3chguy/roomsublist_search_aliases","sha":"41be46a7120075b5792194bcdf2c56f6e9b240fa","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":37144575,"node_id":"MDEwOlJlcG9zaXRvcnkzNzE0NDU3NQ==","name":"matrix-react-sdk","full_name":"matrix-org/matrix-react-sdk","owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/matrix-react-sdk","description":"Matrix SDK for React Javascript","fork":false,"url":"https://api.github.com/repos/matrix-org/matrix-react-sdk","forks_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/forks","keys_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/teams","hooks_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/events","assignees_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/tags","blobs_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/languages","stargazers_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/subscription","commits_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/merges","archive_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/downloads","issues_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/deployments","created_at":"2015-06-09T16:37:07Z","updated_at":"2018-06-12T13:25:17Z","pushed_at":"2018-06-14T09:57:59Z","git_url":"git://github.com/matrix-org/matrix-react-sdk.git","ssh_url":"git@github.com:matrix-org/matrix-react-sdk.git","clone_url":"https://github.com/matrix-org/matrix-react-sdk.git","svn_url":"https://github.com/matrix-org/matrix-react-sdk","homepage":null,"size":19246,"stargazers_count":194,"watchers_count":194,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":135,"mirror_url":null,"archived":false,"open_issues_count":43,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":135,"open_issues":43,"watchers":194,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"791784399ae19836a5e05d302350d80766a97356","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":37144575,"node_id":"MDEwOlJlcG9zaXRvcnkzNzE0NDU3NQ==","name":"matrix-react-sdk","full_name":"matrix-org/matrix-react-sdk","owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/matrix-react-sdk","description":"Matrix SDK for React Javascript","fork":false,"url":"https://api.github.com/repos/matrix-org/matrix-react-sdk","forks_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/forks","keys_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/teams","hooks_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/events","assignees_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/tags","blobs_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/languages","stargazers_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/subscription","commits_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/merges","archive_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/downloads","issues_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/matrix-react-sdk/deployments","created_at":"2015-06-09T16:37:07Z","updated_at":"2018-06-12T13:25:17Z","pushed_at":"2018-06-14T09:57:59Z","git_url":"git://github.com/matrix-org/matrix-react-sdk.git","ssh_url":"git@github.com:matrix-org/matrix-react-sdk.git","clone_url":"https://github.com/matrix-org/matrix-react-sdk.git","svn_url":"https://github.com/matrix-org/matrix-react-sdk","homepage":null,"size":19246,"stargazers_count":194,"watchers_count":194,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":135,"mirror_url":null,"archived":false,"open_issues_count":43,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":135,"open_issues":43,"watchers":194,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957"},"html":{"href":"https://github.com/matrix-org/matrix-react-sdk/pull/1957"},"issue":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/1957"},"comments":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/1957/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/1957/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/41be46a7120075b5792194bcdf2c56f6e9b240fa"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"t3chguy"}}