{"action":"created","comment":{"url":"https://api.github.com/repos/scrollback/scrollback/pulls/comments/36061687","id":36061687,"diff_hunk":"@@ -1,38 +1,40 @@\n \"use strict\";\n \n-var core, config, store;\n+var core, store;\n //var entityOps = require(\"./../entity-ops.js\");\n \n var query;\n \n-module.exports = function(c, conf, s) {\n-\tcore = c;\n-\tconfig = conf;\n-\tstore = s;\n+module.exports = function() {\n+\tcore = arguments[0];\n+\tstore = arguments[2];\n \n-\tquery = require(\"../bulkQuery.js\")(core, store, 'threads');\n+\tquery = require(\"../bulkQuery.js\")(core, store, \"threads\");\n \n \tcore.on(\"setstate\", function(changes, next) {\n \t\tvar user = store.get(\"user\") || \"\",\n \t\t\troom = store.get(\"nav\", room) || \"\",\n-\t\t\tregex = new RegExp(\"_\" + user + \"$\");\n+\t\t\tregex = new RegExp(\"_\" + user + \"$\"),","path":"store/rules/preLoadThreads.js","position":24,"original_position":24,"commit_id":"dac4a137c2fa8ca0c6e8f3739742db38fa194ca8","original_commit_id":"dac4a137c2fa8ca0c6e8f3739742db38fa194ca8","user":{"login":"aravindet","id":210455,"avatar_url":"https://avatars.githubusercontent.com/u/210455?v=3","gravatar_id":"","url":"https://api.github.com/users/aravindet","html_url":"https://github.com/aravindet","followers_url":"https://api.github.com/users/aravindet/followers","following_url":"https://api.github.com/users/aravindet/following{/other_user}","gists_url":"https://api.github.com/users/aravindet/gists{/gist_id}","starred_url":"https://api.github.com/users/aravindet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aravindet/subscriptions","organizations_url":"https://api.github.com/users/aravindet/orgs","repos_url":"https://api.github.com/users/aravindet/repos","events_url":"https://api.github.com/users/aravindet/events{/privacy}","received_events_url":"https://api.github.com/users/aravindet/received_events","type":"User","site_admin":false},"body":"For completeness, `regex = new RegExp(\"_\" + RegExp.escape(user) + \"$\")`\r\n\r\nWe might have to add RegExp.escape to polyfills.","created_at":"2015-08-03T07:33:28Z","updated_at":"2015-08-03T07:33:28Z","html_url":"https://github.com/scrollback/scrollback/pull/827#discussion_r36061687","pull_request_url":"https://api.github.com/repos/scrollback/scrollback/pulls/827","_links":{"self":{"href":"https://api.github.com/repos/scrollback/scrollback/pulls/comments/36061687"},"html":{"href":"https://github.com/scrollback/scrollback/pull/827#discussion_r36061687"},"pull_request":{"href":"https://api.github.com/repos/scrollback/scrollback/pulls/827"}}},"pull_request":{"url":"https://api.github.com/repos/scrollback/scrollback/pulls/827","id":41204734,"html_url":"https://github.com/scrollback/scrollback/pull/827","diff_url":"https://github.com/scrollback/scrollback/pull/827.diff","patch_url":"https://github.com/scrollback/scrollback/pull/827.patch","issue_url":"https://api.github.com/repos/scrollback/scrollback/issues/827","number":827,"state":"open","locked":false,"title":"Avoid preload of users and threads.","user":{"login":"harishkumarv","id":1932511,"avatar_url":"https://avatars.githubusercontent.com/u/1932511?v=3","gravatar_id":"","url":"https://api.github.com/users/harishkumarv","html_url":"https://github.com/harishkumarv","followers_url":"https://api.github.com/users/harishkumarv/followers","following_url":"https://api.github.com/users/harishkumarv/following{/other_user}","gists_url":"https://api.github.com/users/harishkumarv/gists{/gist_id}","starred_url":"https://api.github.com/users/harishkumarv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harishkumarv/subscriptions","organizations_url":"https://api.github.com/users/harishkumarv/orgs","repos_url":"https://api.github.com/users/harishkumarv/repos","events_url":"https://api.github.com/users/harishkumarv/events{/privacy}","received_events_url":"https://api.github.com/users/harishkumarv/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-30T07:21:00Z","updated_at":"2015-08-03T07:33:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11774ed100e8fd0010e0a7c826776736e185bdbc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scrollback/scrollback/pulls/827/commits","review_comments_url":"https://api.github.com/repos/scrollback/scrollback/pulls/827/comments","review_comment_url":"https://api.github.com/repos/scrollback/scrollback/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scrollback/scrollback/issues/827/comments","statuses_url":"https://api.github.com/repos/scrollback/scrollback/statuses/dac4a137c2fa8ca0c6e8f3739742db38fa194ca8","head":{"label":"scrollback:query-on-nav","ref":"query-on-nav","sha":"dac4a137c2fa8ca0c6e8f3739742db38fa194ca8","user":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"repo":{"id":11632485,"name":"scrollback","full_name":"scrollback/scrollback","owner":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrollback/scrollback","description":"Embeddable cross-platform chat for communities","fork":false,"url":"https://api.github.com/repos/scrollback/scrollback","forks_url":"https://api.github.com/repos/scrollback/scrollback/forks","keys_url":"https://api.github.com/repos/scrollback/scrollback/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrollback/scrollback/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrollback/scrollback/teams","hooks_url":"https://api.github.com/repos/scrollback/scrollback/hooks","issue_events_url":"https://api.github.com/repos/scrollback/scrollback/issues/events{/number}","events_url":"https://api.github.com/repos/scrollback/scrollback/events","assignees_url":"https://api.github.com/repos/scrollback/scrollback/assignees{/user}","branches_url":"https://api.github.com/repos/scrollback/scrollback/branches{/branch}","tags_url":"https://api.github.com/repos/scrollback/scrollback/tags","blobs_url":"https://api.github.com/repos/scrollback/scrollback/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrollback/scrollback/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrollback/scrollback/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrollback/scrollback/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrollback/scrollback/statuses/{sha}","languages_url":"https://api.github.com/repos/scrollback/scrollback/languages","stargazers_url":"https://api.github.com/repos/scrollback/scrollback/stargazers","contributors_url":"https://api.github.com/repos/scrollback/scrollback/contributors","subscribers_url":"https://api.github.com/repos/scrollback/scrollback/subscribers","subscription_url":"https://api.github.com/repos/scrollback/scrollback/subscription","commits_url":"https://api.github.com/repos/scrollback/scrollback/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrollback/scrollback/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrollback/scrollback/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrollback/scrollback/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrollback/scrollback/contents/{+path}","compare_url":"https://api.github.com/repos/scrollback/scrollback/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrollback/scrollback/merges","archive_url":"https://api.github.com/repos/scrollback/scrollback/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrollback/scrollback/downloads","issues_url":"https://api.github.com/repos/scrollback/scrollback/issues{/number}","pulls_url":"https://api.github.com/repos/scrollback/scrollback/pulls{/number}","milestones_url":"https://api.github.com/repos/scrollback/scrollback/milestones{/number}","notifications_url":"https://api.github.com/repos/scrollback/scrollback/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrollback/scrollback/labels{/name}","releases_url":"https://api.github.com/repos/scrollback/scrollback/releases{/id}","created_at":"2013-07-24T10:49:24Z","updated_at":"2015-07-31T09:26:57Z","pushed_at":"2015-08-03T07:31:23Z","git_url":"git://github.com/scrollback/scrollback.git","ssh_url":"git@github.com:scrollback/scrollback.git","clone_url":"https://github.com/scrollback/scrollback.git","svn_url":"https://github.com/scrollback/scrollback","homepage":null,"size":71792,"stargazers_count":486,"watchers_count":486,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":42,"forks":133,"open_issues":42,"watchers":486,"default_branch":"master"}},"base":{"label":"scrollback:master","ref":"master","sha":"a7a34ea6588ffd893e96756c6fcbf823d396a47f","user":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"repo":{"id":11632485,"name":"scrollback","full_name":"scrollback/scrollback","owner":{"login":"scrollback","id":4928074,"avatar_url":"https://avatars.githubusercontent.com/u/4928074?v=3","gravatar_id":"","url":"https://api.github.com/users/scrollback","html_url":"https://github.com/scrollback","followers_url":"https://api.github.com/users/scrollback/followers","following_url":"https://api.github.com/users/scrollback/following{/other_user}","gists_url":"https://api.github.com/users/scrollback/gists{/gist_id}","starred_url":"https://api.github.com/users/scrollback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrollback/subscriptions","organizations_url":"https://api.github.com/users/scrollback/orgs","repos_url":"https://api.github.com/users/scrollback/repos","events_url":"https://api.github.com/users/scrollback/events{/privacy}","received_events_url":"https://api.github.com/users/scrollback/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrollback/scrollback","description":"Embeddable cross-platform chat for communities","fork":false,"url":"https://api.github.com/repos/scrollback/scrollback","forks_url":"https://api.github.com/repos/scrollback/scrollback/forks","keys_url":"https://api.github.com/repos/scrollback/scrollback/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrollback/scrollback/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrollback/scrollback/teams","hooks_url":"https://api.github.com/repos/scrollback/scrollback/hooks","issue_events_url":"https://api.github.com/repos/scrollback/scrollback/issues/events{/number}","events_url":"https://api.github.com/repos/scrollback/scrollback/events","assignees_url":"https://api.github.com/repos/scrollback/scrollback/assignees{/user}","branches_url":"https://api.github.com/repos/scrollback/scrollback/branches{/branch}","tags_url":"https://api.github.com/repos/scrollback/scrollback/tags","blobs_url":"https://api.github.com/repos/scrollback/scrollback/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrollback/scrollback/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrollback/scrollback/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrollback/scrollback/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrollback/scrollback/statuses/{sha}","languages_url":"https://api.github.com/repos/scrollback/scrollback/languages","stargazers_url":"https://api.github.com/repos/scrollback/scrollback/stargazers","contributors_url":"https://api.github.com/repos/scrollback/scrollback/contributors","subscribers_url":"https://api.github.com/repos/scrollback/scrollback/subscribers","subscription_url":"https://api.github.com/repos/scrollback/scrollback/subscription","commits_url":"https://api.github.com/repos/scrollback/scrollback/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrollback/scrollback/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrollback/scrollback/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrollback/scrollback/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrollback/scrollback/contents/{+path}","compare_url":"https://api.github.com/repos/scrollback/scrollback/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrollback/scrollback/merges","archive_url":"https://api.github.com/repos/scrollback/scrollback/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrollback/scrollback/downloads","issues_url":"https://api.github.com/repos/scrollback/scrollback/issues{/number}","pulls_url":"https://api.github.com/repos/scrollback/scrollback/pulls{/number}","milestones_url":"https://api.github.com/repos/scrollback/scrollback/milestones{/number}","notifications_url":"https://api.github.com/repos/scrollback/scrollback/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrollback/scrollback/labels{/name}","releases_url":"https://api.github.com/repos/scrollback/scrollback/releases{/id}","created_at":"2013-07-24T10:49:24Z","updated_at":"2015-07-31T09:26:57Z","pushed_at":"2015-08-03T07:31:23Z","git_url":"git://github.com/scrollback/scrollback.git","ssh_url":"git@github.com:scrollback/scrollback.git","clone_url":"https://github.com/scrollback/scrollback.git","svn_url":"https://github.com/scrollback/scrollback","homepage":null,"size":71792,"stargazers_count":486,"watchers_count":486,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":42,"forks":133,"open_issues":42,"watchers":486,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scrollback/scrollback/pulls/827"},"html":{"href":"https://github.com/scrollback/scrollback/pull/827"},"issue":{"href":"https://api.github.com/repos/scrollback/scrollback/issues/827"},"comments":{"href":"https://api.github.com/repos/scrollback/scrollback/issues/827/comments"},"review_comments":{"href":"https://api.github.com/repos/scrollback/scrollback/pulls/827/comments"},"review_comment":{"href":"https://api.github.com/repos/scrollback/scrollback/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scrollback/scrollback/pulls/827/commits"},"statuses":{"href":"https://api.github.com/repos/scrollback/scrollback/statuses/dac4a137c2fa8ca0c6e8f3739742db38fa194ca8"}}}}