{"action":"created","comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments/40249980","id":40249980,"diff_hunk":"@@ -13,7 +19,7 @@ Meteor.methods\n \t\tif room.usernames.indexOf(data.username) isnt -1\n \t\t\treturn\n \n-\t\tnewUser = RocketChat.models.Users.findOneByUsername username: data.username","path":"server/methods/addUserToRoom.coffee","position":19,"original_position":19,"commit_id":"406edf089cc13d5281d5af33fd941c1ef9f6a0c4","original_commit_id":"406edf089cc13d5281d5af33fd941c1ef9f6a0c4","user":{"login":"rwakida","id":5505749,"avatar_url":"https://avatars.githubusercontent.com/u/5505749?v=3","gravatar_id":"","url":"https://api.github.com/users/rwakida","html_url":"https://github.com/rwakida","followers_url":"https://api.github.com/users/rwakida/followers","following_url":"https://api.github.com/users/rwakida/following{/other_user}","gists_url":"https://api.github.com/users/rwakida/gists{/gist_id}","starred_url":"https://api.github.com/users/rwakida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwakida/subscriptions","organizations_url":"https://api.github.com/users/rwakida/orgs","repos_url":"https://api.github.com/users/rwakida/repos","events_url":"https://api.github.com/users/rwakida/events{/privacy}","received_events_url":"https://api.github.com/users/rwakida/received_events","type":"User","site_admin":false},"body":"You made a lot of changes.  It's hard to catch everything.  :smile: \r\n\r\nI like how you consolidated the logic into the models.  It should be a lot easier to maintain.  ","created_at":"2015-09-23T19:59:53Z","updated_at":"2015-09-23T19:59:53Z","html_url":"https://github.com/RocketChat/Rocket.Chat/pull/860#discussion_r40249980","pull_request_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860","_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments/40249980"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat/pull/860#discussion_r40249980"},"pull_request":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860"}}},"pull_request":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860","id":45752342,"html_url":"https://github.com/RocketChat/Rocket.Chat/pull/860","diff_url":"https://github.com/RocketChat/Rocket.Chat/pull/860.diff","patch_url":"https://github.com/RocketChat/Rocket.Chat/pull/860.patch","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/860","number":860,"state":"closed","locked":false,"title":"Fix #857  Cannot add user to room.  ","user":{"login":"rwakida","id":5505749,"avatar_url":"https://avatars.githubusercontent.com/u/5505749?v=3","gravatar_id":"","url":"https://api.github.com/users/rwakida","html_url":"https://github.com/rwakida","followers_url":"https://api.github.com/users/rwakida/followers","following_url":"https://api.github.com/users/rwakida/following{/other_user}","gists_url":"https://api.github.com/users/rwakida/gists{/gist_id}","starred_url":"https://api.github.com/users/rwakida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwakida/subscriptions","organizations_url":"https://api.github.com/users/rwakida/orgs","repos_url":"https://api.github.com/users/rwakida/repos","events_url":"https://api.github.com/users/rwakida/events{/privacy}","received_events_url":"https://api.github.com/users/rwakida/received_events","type":"User","site_admin":false},"body":"Fix bug where username incorrectly passed to findOneByUsername.  Also adds argument validation.","created_at":"2015-09-23T08:02:48Z","updated_at":"2015-09-23T19:59:53Z","closed_at":"2015-09-23T12:38:16Z","merged_at":"2015-09-23T12:38:16Z","merge_commit_sha":"675b20a7bb19adf849d12ac0ace896a8f9b20815","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860/commits","review_comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860/comments","review_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/860/comments","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/406edf089cc13d5281d5af33fd941c1ef9f6a0c4","head":{"label":"RocketChat:bugfix/857-cannot-add-user-to-room","ref":"bugfix/857-cannot-add-user-to-room","sha":"406edf089cc13d5281d5af33fd941c1ef9f6a0c4","user":{"login":"RocketChat","id":12508788,"avatar_url":"https://avatars.githubusercontent.com/u/12508788?v=3","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"repo":{"id":35866694,"name":"Rocket.Chat","full_name":"RocketChat/Rocket.Chat","owner":{"login":"RocketChat","id":12508788,"avatar_url":"https://avatars.githubusercontent.com/u/12508788?v=3","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RocketChat/Rocket.Chat","description":"Have your own Slack like online chat, built with Meteor.","fork":false,"url":"https://api.github.com/repos/RocketChat/Rocket.Chat","forks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/forks","keys_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/teams","hooks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/hooks","issue_events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/events{/number}","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/events","assignees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/assignees{/user}","branches_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/branches{/branch}","tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/tags","blobs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/refs{/sha}","trees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/{sha}","languages_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/languages","stargazers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/stargazers","contributors_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/contributors","subscribers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/subscribers","subscription_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/subscription","commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/commits{/sha}","git_commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/commits{/sha}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/comments{/number}","issue_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments{/number}","contents_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/contents/{+path}","compare_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/merges","archive_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/downloads","issues_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues{/number}","pulls_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls{/number}","milestones_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/milestones{/number}","notifications_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels{/name}","releases_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/releases{/id}","created_at":"2015-05-19T07:36:09Z","updated_at":"2015-09-23T18:58:14Z","pushed_at":"2015-09-23T19:59:11Z","git_url":"git://github.com/RocketChat/Rocket.Chat.git","ssh_url":"git@github.com:RocketChat/Rocket.Chat.git","clone_url":"https://github.com/RocketChat/Rocket.Chat.git","svn_url":"https://github.com/RocketChat/Rocket.Chat","homepage":"https://rocket.chat/","size":26751,"stargazers_count":3335,"watchers_count":3335,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":505,"mirror_url":null,"open_issues_count":200,"forks":505,"open_issues":200,"watchers":3335,"default_branch":"master"}},"base":{"label":"RocketChat:master","ref":"master","sha":"1875e331422be22f71dd461e1f8b060f363df829","user":{"login":"RocketChat","id":12508788,"avatar_url":"https://avatars.githubusercontent.com/u/12508788?v=3","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"repo":{"id":35866694,"name":"Rocket.Chat","full_name":"RocketChat/Rocket.Chat","owner":{"login":"RocketChat","id":12508788,"avatar_url":"https://avatars.githubusercontent.com/u/12508788?v=3","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RocketChat/Rocket.Chat","description":"Have your own Slack like online chat, built with Meteor.","fork":false,"url":"https://api.github.com/repos/RocketChat/Rocket.Chat","forks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/forks","keys_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/teams","hooks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/hooks","issue_events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/events{/number}","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/events","assignees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/assignees{/user}","branches_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/branches{/branch}","tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/tags","blobs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/refs{/sha}","trees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/{sha}","languages_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/languages","stargazers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/stargazers","contributors_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/contributors","subscribers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/subscribers","subscription_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/subscription","commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/commits{/sha}","git_commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/git/commits{/sha}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/comments{/number}","issue_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments{/number}","contents_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/contents/{+path}","compare_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/merges","archive_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/downloads","issues_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues{/number}","pulls_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls{/number}","milestones_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/milestones{/number}","notifications_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels{/name}","releases_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/releases{/id}","created_at":"2015-05-19T07:36:09Z","updated_at":"2015-09-23T18:58:14Z","pushed_at":"2015-09-23T19:59:11Z","git_url":"git://github.com/RocketChat/Rocket.Chat.git","ssh_url":"git@github.com:RocketChat/Rocket.Chat.git","clone_url":"https://github.com/RocketChat/Rocket.Chat.git","svn_url":"https://github.com/RocketChat/Rocket.Chat","homepage":"https://rocket.chat/","size":26751,"stargazers_count":3335,"watchers_count":3335,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":505,"mirror_url":null,"open_issues_count":200,"forks":505,"open_issues":200,"watchers":3335,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat/pull/860"},"issue":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/860"},"comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/860/comments"},"review_comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860/comments"},"review_comment":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/pulls/860/commits"},"statuses":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat/statuses/406edf089cc13d5281d5af33fd941c1ef9f6a0c4"}}}}