GitHub PullRequestReviewCommentEvent at 2014-12-02 03:35:19
Repository: node-confbridge-js
Actor: samuelg
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/comments/21138552","id":21138552,"diff_hunk":"@@ -109,17 +98,29 @@ function BridgeSetup(ari) {\n       }\n     });\n     bridge.on('ChannelLeftBridge', function (event, instances) {\n-      delete(bridge.channels[instances.channel.id]);\n+      var channelId = instances.channel.id;\n+      delete(bridge.channels[channelId]);\n       users.handleDone(instances.channel);\n       bridge.fsm.handle('userExit', {confBridge: instances.bridge});\n       bridge.lastJoined = bridge.lastJoined.filter(function(candidate) {\n-        return candidate !== instances.channel.id;\n+        return candidate !== channelId;\n       });\n       var userList = users.getUsers();\n+      if (userList[channelId].group.group_behavior === 'leader') {\n+        groups.removeLeader(instances.channel);\n+        if (groups.leaderSize() === 0) {\n+          var followers = groups.getFollowers();\n+          for (var chanId in followers) {\n+            userList[chanId].fsm.handle('noLeaders');\n+          }\n+        }\n+      }\n       for (var chanId in userList) {\n         if (!userList[chanId].settings.quiet &&\n             userList[chanId].fsm.isActive()) {\n-          var soundToPlay = util.format('sound:%s', settings.leave_sound);\n+          var playback = ari.Playback();","path":"lib/helpers/bridgesetup.js","position":121,"original_position":121,"commit_id":"14fe83e44d431b6bcde571a1f139d01053aa6b53","original_commit_id":"14fe83e44d431b6bcde571a1f139d01053aa6b53","user":{"login":"samuelg","id":21962,"avatar_url":"https://avatars.githubusercontent.com/u/21962?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelg","html_url":"https://github.com/samuelg","followers_url":"https://api.github.com/users/samuelg/followers","following_url":"https://api.github.com/users/samuelg/following{/other_user}","gists_url":"https://api.github.com/users/samuelg/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelg/subscriptions","organizations_url":"https://api.github.com/users/samuelg/orgs","repos_url":"https://api.github.com/users/samuelg/repos","events_url":"https://api.github.com/users/samuelg/events{/privacy}","received_events_url":"https://api.github.com/users/samuelg/received_events","type":"User","site_admin":false},"body":"Looks like the Playback object is never used here.","created_at":"2014-12-02T03:35:19Z","updated_at":"2014-12-02T03:35:19Z","html_url":"https://github.com/semidy/node-confbridge-js/pull/13#discussion_r21138552","pull_request_url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/comments/21138552"},"html":{"href":"https://github.com/semidy/node-confbridge-js/pull/13#discussion_r21138552"},"pull_request":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13","id":24943825,"html_url":"https://github.com/semidy/node-confbridge-js/pull/13","diff_url":"https://github.com/semidy/node-confbridge-js/pull/13.diff","patch_url":"https://github.com/semidy/node-confbridge-js/pull/13.patch","issue_url":"https://api.github.com/repos/semidy/node-confbridge-js/issues/13","number":13,"state":"open","locked":false,"title":"Added minor group functionality.","user":{"login":"bkford","id":8698307,"avatar_url":"https://avatars.githubusercontent.com/u/8698307?v=3","gravatar_id":"","url":"https://api.github.com/users/bkford","html_url":"https://github.com/bkford","followers_url":"https://api.github.com/users/bkford/followers","following_url":"https://api.github.com/users/bkford/following{/other_user}","gists_url":"https://api.github.com/users/bkford/gists{/gist_id}","starred_url":"https://api.github.com/users/bkford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkford/subscriptions","organizations_url":"https://api.github.com/users/bkford/orgs","repos_url":"https://api.github.com/users/bkford/repos","events_url":"https://api.github.com/users/bkford/events{/privacy}","received_events_url":"https://api.github.com/users/bkford/received_events","type":"User","site_admin":false},"body":"We added the ability to provide a group profile to the Stasis\r\ncommand, which will in turn fetch the profile from the database.\r\nA user will default to a participant if nothing is specified,\r\nwhich enters the application like normal. Leaders and followers\r\nare kept up with in groupsetup.js. Followers are put into the\r\nwaiting state (waiting for leaders). Leaders have no functionality\r\nas of right now.\r\n\r\n* Added database retrieval for groups\r\n* Added a module to keep track of groups\r\n* Added minor follower functionality","created_at":"2014-11-24T16:22:29Z","updated_at":"2014-12-02T03:35:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3521f9aa9d8e72ffed14ea2ece33024c126e0db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13/commits","review_comments_url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13/comments","review_comment_url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/semidy/node-confbridge-js/issues/13/comments","statuses_url":"https://api.github.com/repos/semidy/node-confbridge-js/statuses/14fe83e44d431b6bcde571a1f139d01053aa6b53","head":{"label":"bkford:groups","ref":"groups","sha":"14fe83e44d431b6bcde571a1f139d01053aa6b53","user":{"login":"bkford","id":8698307,"avatar_url":"https://avatars.githubusercontent.com/u/8698307?v=3","gravatar_id":"","url":"https://api.github.com/users/bkford","html_url":"https://github.com/bkford","followers_url":"https://api.github.com/users/bkford/followers","following_url":"https://api.github.com/users/bkford/following{/other_user}","gists_url":"https://api.github.com/users/bkford/gists{/gist_id}","starred_url":"https://api.github.com/users/bkford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkford/subscriptions","organizations_url":"https://api.github.com/users/bkford/orgs","repos_url":"https://api.github.com/users/bkford/repos","events_url":"https://api.github.com/users/bkford/events{/privacy}","received_events_url":"https://api.github.com/users/bkford/received_events","type":"User","site_admin":false},"repo":{"id":23805320,"name":"node-confbridge-js","full_name":"bkford/node-confbridge-js","owner":{"login":"bkford","id":8698307,"avatar_url":"https://avatars.githubusercontent.com/u/8698307?v=3","gravatar_id":"","url":"https://api.github.com/users/bkford","html_url":"https://github.com/bkford","followers_url":"https://api.github.com/users/bkford/followers","following_url":"https://api.github.com/users/bkford/following{/other_user}","gists_url":"https://api.github.com/users/bkford/gists{/gist_id}","starred_url":"https://api.github.com/users/bkford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkford/subscriptions","organizations_url":"https://api.github.com/users/bkford/orgs","repos_url":"https://api.github.com/users/bkford/repos","events_url":"https://api.github.com/users/bkford/events{/privacy}","received_events_url":"https://api.github.com/users/bkford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bkford/node-confbridge-js","description":"This is a basic configuration for a Conference Bridge Application using ARI and node.js","fork":true,"url":"https://api.github.com/repos/bkford/node-confbridge-js","forks_url":"https://api.github.com/repos/bkford/node-confbridge-js/forks","keys_url":"https://api.github.com/repos/bkford/node-confbridge-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bkford/node-confbridge-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bkford/node-confbridge-js/teams","hooks_url":"https://api.github.com/repos/bkford/node-confbridge-js/hooks","issue_events_url":"https://api.github.com/repos/bkford/node-confbridge-js/issues/events{/number}","events_url":"https://api.github.com/repos/bkford/node-confbridge-js/events","assignees_url":"https://api.github.com/repos/bkford/node-confbridge-js/assignees{/user}","branches_url":"https://api.github.com/repos/bkford/node-confbridge-js/branches{/branch}","tags_url":"https://api.github.com/repos/bkford/node-confbridge-js/tags","blobs_url":"https://api.github.com/repos/bkford/node-confbridge-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bkford/node-confbridge-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bkford/node-confbridge-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/bkford/node-confbridge-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bkford/node-confbridge-js/statuses/{sha}","languages_url":"https://api.github.com/repos/bkford/node-confbridge-js/languages","stargazers_url":"https://api.github.com/repos/bkford/node-confbridge-js/stargazers","contributors_url":"https://api.github.com/repos/bkford/node-confbridge-js/contributors","subscribers_url":"https://api.github.com/repos/bkford/node-confbridge-js/subscribers","subscription_url":"https://api.github.com/repos/bkford/node-confbridge-js/subscription","commits_url":"https://api.github.com/repos/bkford/node-confbridge-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/bkford/node-confbridge-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/bkford/node-confbridge-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/bkford/node-confbridge-js/issues/comments/{number}","contents_url":"https://api.github.com/repos/bkford/node-confbridge-js/contents/{+path}","compare_url":"https://api.github.com/repos/bkford/node-confbridge-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bkford/node-confbridge-js/merges","archive_url":"https://api.github.com/repos/bkford/node-confbridge-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bkford/node-confbridge-js/downloads","issues_url":"https://api.github.com/repos/bkford/node-confbridge-js/issues{/number}","pulls_url":"https://api.github.com/repos/bkford/node-confbridge-js/pulls{/number}","milestones_url":"https://api.github.com/repos/bkford/node-confbridge-js/milestones{/number}","notifications_url":"https://api.github.com/repos/bkford/node-confbridge-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bkford/node-confbridge-js/labels{/name}","releases_url":"https://api.github.com/repos/bkford/node-confbridge-js/releases{/id}","created_at":"2014-09-08T19:38:16Z","updated_at":"2014-09-08T20:00:46Z","pushed_at":"2014-12-01T20:50:04Z","git_url":"git://github.com/bkford/node-confbridge-js.git","ssh_url":"git@github.com:bkford/node-confbridge-js.git","clone_url":"https://github.com/bkford/node-confbridge-js.git","svn_url":"https://github.com/bkford/node-confbridge-js","homepage":null,"size":341,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"semidy:master","ref":"master","sha":"9fc1a7d43bd7c7043983f353af94e7017c267581","user":{"login":"semidy","id":8697079,"avatar_url":"https://avatars.githubusercontent.com/u/8697079?v=3","gravatar_id":"","url":"https://api.github.com/users/semidy","html_url":"https://github.com/semidy","followers_url":"https://api.github.com/users/semidy/followers","following_url":"https://api.github.com/users/semidy/following{/other_user}","gists_url":"https://api.github.com/users/semidy/gists{/gist_id}","starred_url":"https://api.github.com/users/semidy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semidy/subscriptions","organizations_url":"https://api.github.com/users/semidy/orgs","repos_url":"https://api.github.com/users/semidy/repos","events_url":"https://api.github.com/users/semidy/events{/privacy}","received_events_url":"https://api.github.com/users/semidy/received_events","type":"User","site_admin":false},"repo":{"id":23796236,"name":"node-confbridge-js","full_name":"semidy/node-confbridge-js","owner":{"login":"semidy","id":8697079,"avatar_url":"https://avatars.githubusercontent.com/u/8697079?v=3","gravatar_id":"","url":"https://api.github.com/users/semidy","html_url":"https://github.com/semidy","followers_url":"https://api.github.com/users/semidy/followers","following_url":"https://api.github.com/users/semidy/following{/other_user}","gists_url":"https://api.github.com/users/semidy/gists{/gist_id}","starred_url":"https://api.github.com/users/semidy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semidy/subscriptions","organizations_url":"https://api.github.com/users/semidy/orgs","repos_url":"https://api.github.com/users/semidy/repos","events_url":"https://api.github.com/users/semidy/events{/privacy}","received_events_url":"https://api.github.com/users/semidy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/semidy/node-confbridge-js","description":"This is a basic configuration for a Conference Bridge Application using ARI and node.js","fork":false,"url":"https://api.github.com/repos/semidy/node-confbridge-js","forks_url":"https://api.github.com/repos/semidy/node-confbridge-js/forks","keys_url":"https://api.github.com/repos/semidy/node-confbridge-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/semidy/node-confbridge-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/semidy/node-confbridge-js/teams","hooks_url":"https://api.github.com/repos/semidy/node-confbridge-js/hooks","issue_events_url":"https://api.github.com/repos/semidy/node-confbridge-js/issues/events{/number}","events_url":"https://api.github.com/repos/semidy/node-confbridge-js/events","assignees_url":"https://api.github.com/repos/semidy/node-confbridge-js/assignees{/user}","branches_url":"https://api.github.com/repos/semidy/node-confbridge-js/branches{/branch}","tags_url":"https://api.github.com/repos/semidy/node-confbridge-js/tags","blobs_url":"https://api.github.com/repos/semidy/node-confbridge-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/semidy/node-confbridge-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/semidy/node-confbridge-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/semidy/node-confbridge-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/semidy/node-confbridge-js/statuses/{sha}","languages_url":"https://api.github.com/repos/semidy/node-confbridge-js/languages","stargazers_url":"https://api.github.com/repos/semidy/node-confbridge-js/stargazers","contributors_url":"https://api.github.com/repos/semidy/node-confbridge-js/contributors","subscribers_url":"https://api.github.com/repos/semidy/node-confbridge-js/subscribers","subscription_url":"https://api.github.com/repos/semidy/node-confbridge-js/subscription","commits_url":"https://api.github.com/repos/semidy/node-confbridge-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/semidy/node-confbridge-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/semidy/node-confbridge-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/semidy/node-confbridge-js/issues/comments/{number}","contents_url":"https://api.github.com/repos/semidy/node-confbridge-js/contents/{+path}","compare_url":"https://api.github.com/repos/semidy/node-confbridge-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/semidy/node-confbridge-js/merges","archive_url":"https://api.github.com/repos/semidy/node-confbridge-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/semidy/node-confbridge-js/downloads","issues_url":"https://api.github.com/repos/semidy/node-confbridge-js/issues{/number}","pulls_url":"https://api.github.com/repos/semidy/node-confbridge-js/pulls{/number}","milestones_url":"https://api.github.com/repos/semidy/node-confbridge-js/milestones{/number}","notifications_url":"https://api.github.com/repos/semidy/node-confbridge-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/semidy/node-confbridge-js/labels{/name}","releases_url":"https://api.github.com/repos/semidy/node-confbridge-js/releases{/id}","created_at":"2014-09-08T15:25:27Z","updated_at":"2014-11-20T19:57:50Z","pushed_at":"2014-11-20T19:57:50Z","git_url":"git://github.com/semidy/node-confbridge-js.git","ssh_url":"git@github.com:semidy/node-confbridge-js.git","clone_url":"https://github.com/semidy/node-confbridge-js.git","svn_url":"https://github.com/semidy/node-confbridge-js","homepage":null,"size":536,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13"},"html":{"href":"https://github.com/semidy/node-confbridge-js/pull/13"},"issue":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/issues/13"},"comments":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/semidy/node-confbridge-js/statuses/14fe83e44d431b6bcde571a1f139d01053aa6b53"}}}}