{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/loop-server/pulls/comments/34695198","id":34695198,"diff_hunk":"@@ -472,7 +472,17 @@ module.exports = function (apiRouter, conf, logError, storage, filestorage, auth\n         handleUpdateStatus: function(req, res) {\n           // Room status update is validated and logged in middlewares\n           validators.validateRoomStatusUpdate(req, res, function () {\n-            res.status(204).json();\n+            storage.getRoomParticipant(req.token, participantHmac,\n+              function(err, participant) {\n+                if (res.serverError(err)) return;\n+                if (participant === null) {\n+                  sendError(res, 400, errors.NOT_ROOM_PARTICIPANT,\n+                            \"Unable to leave a room you have not joined.\");\n+                  return;","path":"loop/routes/rooms.js","position":11,"original_position":11,"commit_id":"d7c9178d320ab95ebd43a1383de7cac4838fa865","original_commit_id":"d7c9178d320ab95ebd43a1383de7cac4838fa865","user":{"login":"Natim","id":229453,"avatar_url":"https://avatars.githubusercontent.com/u/229453?v=3","gravatar_id":"","url":"https://api.github.com/users/Natim","html_url":"https://github.com/Natim","followers_url":"https://api.github.com/users/Natim/followers","following_url":"https://api.github.com/users/Natim/following{/other_user}","gists_url":"https://api.github.com/users/Natim/gists{/gist_id}","starred_url":"https://api.github.com/users/Natim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Natim/subscriptions","organizations_url":"https://api.github.com/users/Natim/orgs","repos_url":"https://api.github.com/users/Natim/repos","events_url":"https://api.github.com/users/Natim/events{/privacy}","received_events_url":"https://api.github.com/users/Natim/received_events","type":"User","site_admin":false},"body":"Also the message doesn't looks right here.","created_at":"2015-07-15T16:03:20Z","updated_at":"2015-07-15T16:03:20Z","html_url":"https://github.com/mozilla-services/loop-server/pull/339#discussion_r34695198","pull_request_url":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/loop-server/pulls/comments/34695198"},"html":{"href":"https://github.com/mozilla-services/loop-server/pull/339#discussion_r34695198"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339","id":40003958,"html_url":"https://github.com/mozilla-services/loop-server/pull/339","diff_url":"https://github.com/mozilla-services/loop-server/pull/339.diff","patch_url":"https://github.com/mozilla-services/loop-server/pull/339.patch","issue_url":"https://api.github.com/repos/mozilla-services/loop-server/issues/339","number":339,"state":"open","locked":false,"title":"Bug 1169373 — Log roomConnectionId on /rooms/:roomToken status update calls.","user":{"login":"Natim","id":229453,"avatar_url":"https://avatars.githubusercontent.com/u/229453?v=3","gravatar_id":"","url":"https://api.github.com/users/Natim","html_url":"https://github.com/Natim","followers_url":"https://api.github.com/users/Natim/followers","following_url":"https://api.github.com/users/Natim/following{/other_user}","gists_url":"https://api.github.com/users/Natim/gists{/gist_id}","starred_url":"https://api.github.com/users/Natim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Natim/subscriptions","organizations_url":"https://api.github.com/users/Natim/orgs","repos_url":"https://api.github.com/users/Natim/repos","events_url":"https://api.github.com/users/Natim/events{/privacy}","received_events_url":"https://api.github.com/users/Natim/received_events","type":"User","site_admin":false},"body":"https://bugzilla.mozilla.org/show_bug.cgi?id=1169373","created_at":"2015-07-15T09:36:52Z","updated_at":"2015-07-15T16:03:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c59633011db3e32f75176c18a8555bb16c640bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/loop-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/loop-server/issues/339/comments","statuses_url":"https://api.github.com/repos/mozilla-services/loop-server/statuses/d7c9178d320ab95ebd43a1383de7cac4838fa865","head":{"label":"mozilla-services:1169373-roomConnectionId-for-status","ref":"1169373-roomConnectionId-for-status","sha":"d7c9178d320ab95ebd43a1383de7cac4838fa865","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":17026140,"name":"loop-server","full_name":"mozilla-services/loop-server","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/loop-server","description":"The mozilla loop server","fork":false,"url":"https://api.github.com/repos/mozilla-services/loop-server","forks_url":"https://api.github.com/repos/mozilla-services/loop-server/forks","keys_url":"https://api.github.com/repos/mozilla-services/loop-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/loop-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/loop-server/teams","hooks_url":"https://api.github.com/repos/mozilla-services/loop-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/loop-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/loop-server/events","assignees_url":"https://api.github.com/repos/mozilla-services/loop-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/loop-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/loop-server/tags","blobs_url":"https://api.github.com/repos/mozilla-services/loop-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/loop-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/loop-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/loop-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/loop-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/loop-server/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/loop-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/loop-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/loop-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/loop-server/subscription","commits_url":"https://api.github.com/repos/mozilla-services/loop-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/loop-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/loop-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/loop-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/loop-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/loop-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/loop-server/merges","archive_url":"https://api.github.com/repos/mozilla-services/loop-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/loop-server/downloads","issues_url":"https://api.github.com/repos/mozilla-services/loop-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/loop-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/loop-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/loop-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/loop-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/loop-server/releases{/id}","created_at":"2014-02-20T16:02:00Z","updated_at":"2015-06-18T23:07:59Z","pushed_at":"2015-07-15T09:36:53Z","git_url":"git://github.com/mozilla-services/loop-server.git","ssh_url":"git@github.com:mozilla-services/loop-server.git","clone_url":"https://github.com/mozilla-services/loop-server.git","svn_url":"https://github.com/mozilla-services/loop-server","homepage":"https://docs.services.mozilla.com/loop/apis.html","size":6484,"stargazers_count":38,"watchers_count":38,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":4,"forks":15,"open_issues":4,"watchers":38,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"6a11a0c209bec6abe6a28fa59a34534d2c38e3a4","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":17026140,"name":"loop-server","full_name":"mozilla-services/loop-server","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/loop-server","description":"The mozilla loop server","fork":false,"url":"https://api.github.com/repos/mozilla-services/loop-server","forks_url":"https://api.github.com/repos/mozilla-services/loop-server/forks","keys_url":"https://api.github.com/repos/mozilla-services/loop-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/loop-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/loop-server/teams","hooks_url":"https://api.github.com/repos/mozilla-services/loop-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/loop-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/loop-server/events","assignees_url":"https://api.github.com/repos/mozilla-services/loop-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/loop-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/loop-server/tags","blobs_url":"https://api.github.com/repos/mozilla-services/loop-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/loop-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/loop-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/loop-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/loop-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/loop-server/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/loop-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/loop-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/loop-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/loop-server/subscription","commits_url":"https://api.github.com/repos/mozilla-services/loop-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/loop-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/loop-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/loop-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/loop-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/loop-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/loop-server/merges","archive_url":"https://api.github.com/repos/mozilla-services/loop-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/loop-server/downloads","issues_url":"https://api.github.com/repos/mozilla-services/loop-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/loop-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/loop-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/loop-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/loop-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/loop-server/releases{/id}","created_at":"2014-02-20T16:02:00Z","updated_at":"2015-06-18T23:07:59Z","pushed_at":"2015-07-15T09:36:53Z","git_url":"git://github.com/mozilla-services/loop-server.git","ssh_url":"git@github.com:mozilla-services/loop-server.git","clone_url":"https://github.com/mozilla-services/loop-server.git","svn_url":"https://github.com/mozilla-services/loop-server","homepage":"https://docs.services.mozilla.com/loop/apis.html","size":6484,"stargazers_count":38,"watchers_count":38,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":4,"forks":15,"open_issues":4,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339"},"html":{"href":"https://github.com/mozilla-services/loop-server/pull/339"},"issue":{"href":"https://api.github.com/repos/mozilla-services/loop-server/issues/339"},"comments":{"href":"https://api.github.com/repos/mozilla-services/loop-server/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/loop-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/loop-server/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/loop-server/statuses/d7c9178d320ab95ebd43a1383de7cac4838fa865"}}}}