{"action":"created","comment":{"url":"https://api.github.com/repos/sdslabs/jinora/pulls/comments/42129880","id":42129880,"diff_hunk":"@@ -54,14 +55,40 @@ app.post \"/webhook\", (req, res) ->\n   # Send a blank response, so slack knows we got it.\n   res.send \"\"\n \n+# Ban the nick\n+app.post \"/user/nick/ban\", (req, res)->\n+  throw \"Invalid Token\" unless req.body.token == process.env.OUTGOING_TOKEN_BOT\n+\n+  if user.ban_nick req.body.nick\n+    res.send \"ok\"\n+    return\n+\n+  res.send \"error!\"\n+\n+# Ban the session\n+app.post \"/user/session/ban\", (req, res)->\n+  throw \"Invalid Token\" unless req.body.token == process.env.OUTGOING_TOKEN_BOT\n+\n+  if user.ban_session req.body.nick\n+    res.send \"ok\"\n+    return\n+\n+  res.send \"error!\"","path":"app.coffee","position":30,"original_position":30,"commit_id":"92ad8de7ffff3d5b7734092267fe8b3af2ba30a6","original_commit_id":"92ad8de7ffff3d5b7734092267fe8b3af2ba30a6","user":{"login":"arpit270896","id":10503465,"avatar_url":"https://avatars.githubusercontent.com/u/10503465?v=3","gravatar_id":"","url":"https://api.github.com/users/arpit270896","html_url":"https://github.com/arpit270896","followers_url":"https://api.github.com/users/arpit270896/followers","following_url":"https://api.github.com/users/arpit270896/following{/other_user}","gists_url":"https://api.github.com/users/arpit270896/gists{/gist_id}","starred_url":"https://api.github.com/users/arpit270896/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arpit270896/subscriptions","organizations_url":"https://api.github.com/users/arpit270896/orgs","repos_url":"https://api.github.com/users/arpit270896/repos","events_url":"https://api.github.com/users/arpit270896/events{/privacy}","received_events_url":"https://api.github.com/users/arpit270896/received_events","type":"User","site_admin":false},"body":"At first I thought the same, but if there's a small typo while typing `jinora ban admin`, the message would reach the users, which destroys the purpose of shadow banning.","created_at":"2015-10-15T14:22:16Z","updated_at":"2015-10-15T14:22:16Z","html_url":"https://github.com/sdslabs/jinora/pull/23#discussion_r42129880","pull_request_url":"https://api.github.com/repos/sdslabs/jinora/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/sdslabs/jinora/pulls/comments/42129880"},"html":{"href":"https://github.com/sdslabs/jinora/pull/23#discussion_r42129880"},"pull_request":{"href":"https://api.github.com/repos/sdslabs/jinora/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/sdslabs/jinora/pulls/23","id":47756116,"html_url":"https://github.com/sdslabs/jinora/pull/23","diff_url":"https://github.com/sdslabs/jinora/pull/23.diff","patch_url":"https://github.com/sdslabs/jinora/pull/23.patch","issue_url":"https://api.github.com/repos/sdslabs/jinora/issues/23","number":23,"state":"open","locked":false,"title":"Shadow ban","user":{"login":"arpit270896","id":10503465,"avatar_url":"https://avatars.githubusercontent.com/u/10503465?v=3","gravatar_id":"","url":"https://api.github.com/users/arpit270896","html_url":"https://github.com/arpit270896","followers_url":"https://api.github.com/users/arpit270896/followers","following_url":"https://api.github.com/users/arpit270896/following{/other_user}","gists_url":"https://api.github.com/users/arpit270896/gists{/gist_id}","starred_url":"https://api.github.com/users/arpit270896/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arpit270896/subscriptions","organizations_url":"https://api.github.com/users/arpit270896/orgs","repos_url":"https://api.github.com/users/arpit270896/repos","events_url":"https://api.github.com/users/arpit270896/events{/privacy}","received_events_url":"https://api.github.com/users/arpit270896/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-15T08:17:15Z","updated_at":"2015-10-15T14:22:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e58c0128aeb11c3fd28f4a3496e19f8a78bbbc2b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sdslabs/jinora/pulls/23/commits","review_comments_url":"https://api.github.com/repos/sdslabs/jinora/pulls/23/comments","review_comment_url":"https://api.github.com/repos/sdslabs/jinora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sdslabs/jinora/issues/23/comments","statuses_url":"https://api.github.com/repos/sdslabs/jinora/statuses/92ad8de7ffff3d5b7734092267fe8b3af2ba30a6","head":{"label":"sdslabs:shadow-ban","ref":"shadow-ban","sha":"92ad8de7ffff3d5b7734092267fe8b3af2ba30a6","user":{"login":"sdslabs","id":597163,"avatar_url":"https://avatars.githubusercontent.com/u/597163?v=3","gravatar_id":"","url":"https://api.github.com/users/sdslabs","html_url":"https://github.com/sdslabs","followers_url":"https://api.github.com/users/sdslabs/followers","following_url":"https://api.github.com/users/sdslabs/following{/other_user}","gists_url":"https://api.github.com/users/sdslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sdslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdslabs/subscriptions","organizations_url":"https://api.github.com/users/sdslabs/orgs","repos_url":"https://api.github.com/users/sdslabs/repos","events_url":"https://api.github.com/users/sdslabs/events{/privacy}","received_events_url":"https://api.github.com/users/sdslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":23931315,"name":"jinora","full_name":"sdslabs/jinora","owner":{"login":"sdslabs","id":597163,"avatar_url":"https://avatars.githubusercontent.com/u/597163?v=3","gravatar_id":"","url":"https://api.github.com/users/sdslabs","html_url":"https://github.com/sdslabs","followers_url":"https://api.github.com/users/sdslabs/followers","following_url":"https://api.github.com/users/sdslabs/following{/other_user}","gists_url":"https://api.github.com/users/sdslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sdslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdslabs/subscriptions","organizations_url":"https://api.github.com/users/sdslabs/orgs","repos_url":"https://api.github.com/users/sdslabs/repos","events_url":"https://api.github.com/users/sdslabs/events{/privacy}","received_events_url":"https://api.github.com/users/sdslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sdslabs/jinora","description":"Slack webhook app to create anonymous public channels","fork":false,"url":"https://api.github.com/repos/sdslabs/jinora","forks_url":"https://api.github.com/repos/sdslabs/jinora/forks","keys_url":"https://api.github.com/repos/sdslabs/jinora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdslabs/jinora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdslabs/jinora/teams","hooks_url":"https://api.github.com/repos/sdslabs/jinora/hooks","issue_events_url":"https://api.github.com/repos/sdslabs/jinora/issues/events{/number}","events_url":"https://api.github.com/repos/sdslabs/jinora/events","assignees_url":"https://api.github.com/repos/sdslabs/jinora/assignees{/user}","branches_url":"https://api.github.com/repos/sdslabs/jinora/branches{/branch}","tags_url":"https://api.github.com/repos/sdslabs/jinora/tags","blobs_url":"https://api.github.com/repos/sdslabs/jinora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdslabs/jinora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdslabs/jinora/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdslabs/jinora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdslabs/jinora/statuses/{sha}","languages_url":"https://api.github.com/repos/sdslabs/jinora/languages","stargazers_url":"https://api.github.com/repos/sdslabs/jinora/stargazers","contributors_url":"https://api.github.com/repos/sdslabs/jinora/contributors","subscribers_url":"https://api.github.com/repos/sdslabs/jinora/subscribers","subscription_url":"https://api.github.com/repos/sdslabs/jinora/subscription","commits_url":"https://api.github.com/repos/sdslabs/jinora/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdslabs/jinora/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdslabs/jinora/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdslabs/jinora/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdslabs/jinora/contents/{+path}","compare_url":"https://api.github.com/repos/sdslabs/jinora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdslabs/jinora/merges","archive_url":"https://api.github.com/repos/sdslabs/jinora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdslabs/jinora/downloads","issues_url":"https://api.github.com/repos/sdslabs/jinora/issues{/number}","pulls_url":"https://api.github.com/repos/sdslabs/jinora/pulls{/number}","milestones_url":"https://api.github.com/repos/sdslabs/jinora/milestones{/number}","notifications_url":"https://api.github.com/repos/sdslabs/jinora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdslabs/jinora/labels{/name}","releases_url":"https://api.github.com/repos/sdslabs/jinora/releases{/id}","created_at":"2014-09-11T18:52:54Z","updated_at":"2015-10-14T18:31:50Z","pushed_at":"2015-10-15T08:18:11Z","git_url":"git://github.com/sdslabs/jinora.git","ssh_url":"git@github.com:sdslabs/jinora.git","clone_url":"https://github.com/sdslabs/jinora.git","svn_url":"https://github.com/sdslabs/jinora","homepage":"https://chat.sdslabs.co","size":697,"stargazers_count":39,"watchers_count":39,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":16,"forks":5,"open_issues":16,"watchers":39,"default_branch":"master"}},"base":{"label":"sdslabs:master","ref":"master","sha":"722b579d1e8b5964fec291b28c9efafe7c0bd02d","user":{"login":"sdslabs","id":597163,"avatar_url":"https://avatars.githubusercontent.com/u/597163?v=3","gravatar_id":"","url":"https://api.github.com/users/sdslabs","html_url":"https://github.com/sdslabs","followers_url":"https://api.github.com/users/sdslabs/followers","following_url":"https://api.github.com/users/sdslabs/following{/other_user}","gists_url":"https://api.github.com/users/sdslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sdslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdslabs/subscriptions","organizations_url":"https://api.github.com/users/sdslabs/orgs","repos_url":"https://api.github.com/users/sdslabs/repos","events_url":"https://api.github.com/users/sdslabs/events{/privacy}","received_events_url":"https://api.github.com/users/sdslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":23931315,"name":"jinora","full_name":"sdslabs/jinora","owner":{"login":"sdslabs","id":597163,"avatar_url":"https://avatars.githubusercontent.com/u/597163?v=3","gravatar_id":"","url":"https://api.github.com/users/sdslabs","html_url":"https://github.com/sdslabs","followers_url":"https://api.github.com/users/sdslabs/followers","following_url":"https://api.github.com/users/sdslabs/following{/other_user}","gists_url":"https://api.github.com/users/sdslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/sdslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdslabs/subscriptions","organizations_url":"https://api.github.com/users/sdslabs/orgs","repos_url":"https://api.github.com/users/sdslabs/repos","events_url":"https://api.github.com/users/sdslabs/events{/privacy}","received_events_url":"https://api.github.com/users/sdslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sdslabs/jinora","description":"Slack webhook app to create anonymous public channels","fork":false,"url":"https://api.github.com/repos/sdslabs/jinora","forks_url":"https://api.github.com/repos/sdslabs/jinora/forks","keys_url":"https://api.github.com/repos/sdslabs/jinora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdslabs/jinora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdslabs/jinora/teams","hooks_url":"https://api.github.com/repos/sdslabs/jinora/hooks","issue_events_url":"https://api.github.com/repos/sdslabs/jinora/issues/events{/number}","events_url":"https://api.github.com/repos/sdslabs/jinora/events","assignees_url":"https://api.github.com/repos/sdslabs/jinora/assignees{/user}","branches_url":"https://api.github.com/repos/sdslabs/jinora/branches{/branch}","tags_url":"https://api.github.com/repos/sdslabs/jinora/tags","blobs_url":"https://api.github.com/repos/sdslabs/jinora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdslabs/jinora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdslabs/jinora/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdslabs/jinora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdslabs/jinora/statuses/{sha}","languages_url":"https://api.github.com/repos/sdslabs/jinora/languages","stargazers_url":"https://api.github.com/repos/sdslabs/jinora/stargazers","contributors_url":"https://api.github.com/repos/sdslabs/jinora/contributors","subscribers_url":"https://api.github.com/repos/sdslabs/jinora/subscribers","subscription_url":"https://api.github.com/repos/sdslabs/jinora/subscription","commits_url":"https://api.github.com/repos/sdslabs/jinora/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdslabs/jinora/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdslabs/jinora/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdslabs/jinora/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdslabs/jinora/contents/{+path}","compare_url":"https://api.github.com/repos/sdslabs/jinora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdslabs/jinora/merges","archive_url":"https://api.github.com/repos/sdslabs/jinora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdslabs/jinora/downloads","issues_url":"https://api.github.com/repos/sdslabs/jinora/issues{/number}","pulls_url":"https://api.github.com/repos/sdslabs/jinora/pulls{/number}","milestones_url":"https://api.github.com/repos/sdslabs/jinora/milestones{/number}","notifications_url":"https://api.github.com/repos/sdslabs/jinora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdslabs/jinora/labels{/name}","releases_url":"https://api.github.com/repos/sdslabs/jinora/releases{/id}","created_at":"2014-09-11T18:52:54Z","updated_at":"2015-10-14T18:31:50Z","pushed_at":"2015-10-15T08:18:11Z","git_url":"git://github.com/sdslabs/jinora.git","ssh_url":"git@github.com:sdslabs/jinora.git","clone_url":"https://github.com/sdslabs/jinora.git","svn_url":"https://github.com/sdslabs/jinora","homepage":"https://chat.sdslabs.co","size":697,"stargazers_count":39,"watchers_count":39,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":16,"forks":5,"open_issues":16,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sdslabs/jinora/pulls/23"},"html":{"href":"https://github.com/sdslabs/jinora/pull/23"},"issue":{"href":"https://api.github.com/repos/sdslabs/jinora/issues/23"},"comments":{"href":"https://api.github.com/repos/sdslabs/jinora/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/sdslabs/jinora/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/sdslabs/jinora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sdslabs/jinora/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/sdslabs/jinora/statuses/92ad8de7ffff3d5b7734092267fe8b3af2ba30a6"}}}}