{"action":"created","comment":{"url":"https://api.github.com/repos/instedd/aida-ui/pulls/comments/222001495","pull_request_review_id":160785355,"id":222001495,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjAwMTQ5NQ==","diff_hunk":"@@ -21,8 +21,11 @@ def create\n             \"page_id\" => \"\", \"verify_token\" => SecureRandom.base58, \"access_token\" => \"\"\n           }\n         when 'websocket'\n+          access_token = SecureRandom.uuid\n+\n           bot.channels.create! kind: \"websocket\", name: \"Web\", config: {\n-            \"access_token\" => SecureRandom.uuid\n+            \"access_token\" => access_token,\n+            \"url_key\" => bot.uuid ? Shortener::ShortenedUrl.generate(\"/c/#{bot.uuid}/#{access_token}\").unique_key : \"\"","path":"app/controllers/api/channels_controller.rb","position":9,"original_position":9,"commit_id":"5f16413ec837d4844d14763742f863590a8346d5","original_commit_id":"5f16413ec837d4844d14763742f863590a8346d5","user":{"login":"nekron","id":957103,"node_id":"MDQ6VXNlcjk1NzEwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/957103?v=4","gravatar_id":"","url":"https://api.github.com/users/nekron","html_url":"https://github.com/nekron","followers_url":"https://api.github.com/users/nekron/followers","following_url":"https://api.github.com/users/nekron/following{/other_user}","gists_url":"https://api.github.com/users/nekron/gists{/gist_id}","starred_url":"https://api.github.com/users/nekron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekron/subscriptions","organizations_url":"https://api.github.com/users/nekron/orgs","repos_url":"https://api.github.com/users/nekron/repos","events_url":"https://api.github.com/users/nekron/events{/privacy}","received_events_url":"https://api.github.com/users/nekron/received_events","type":"User","site_admin":false},"body":"The downside of having this short link as part of the channel config is that you need to remember to delete the short link when deleting the channel. Maybe having a foreign key with a belongs_to and let rails take care of it? It's either that or adding a `before_destroy` method that deletes the links.","created_at":"2018-10-02T15:33:54Z","updated_at":"2018-10-02T15:33:55Z","html_url":"https://github.com/instedd/aida-ui/pull/248#discussion_r222001495","pull_request_url":"https://api.github.com/repos/instedd/aida-ui/pulls/248","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/instedd/aida-ui/pulls/comments/222001495"},"html":{"href":"https://github.com/instedd/aida-ui/pull/248#discussion_r222001495"},"pull_request":{"href":"https://api.github.com/repos/instedd/aida-ui/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/instedd/aida-ui/pulls/248","id":219042860,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MDQyODYw","html_url":"https://github.com/instedd/aida-ui/pull/248","diff_url":"https://github.com/instedd/aida-ui/pull/248.diff","patch_url":"https://github.com/instedd/aida-ui/pull/248.patch","issue_url":"https://api.github.com/repos/instedd/aida-ui/issues/248","number":248,"state":"open","locked":false,"title":"Provide a web channel short link","user":{"login":"aeatencio","id":39921597,"node_id":"MDQ6VXNlcjM5OTIxNTk3","avatar_url":"https://avatars0.githubusercontent.com/u/39921597?v=4","gravatar_id":"","url":"https://api.github.com/users/aeatencio","html_url":"https://github.com/aeatencio","followers_url":"https://api.github.com/users/aeatencio/followers","following_url":"https://api.github.com/users/aeatencio/following{/other_user}","gists_url":"https://api.github.com/users/aeatencio/gists{/gist_id}","starred_url":"https://api.github.com/users/aeatencio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeatencio/subscriptions","organizations_url":"https://api.github.com/users/aeatencio/orgs","repos_url":"https://api.github.com/users/aeatencio/repos","events_url":"https://api.github.com/users/aeatencio/events{/privacy}","received_events_url":"https://api.github.com/users/aeatencio/received_events","type":"User","site_admin":false},"body":"Resolves #244 ","created_at":"2018-09-28T17:58:11Z","updated_at":"2018-10-02T15:33:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8bacfcd6b855b58ee84ca8ef018b0e0c362b724","assignee":{"login":"nekron","id":957103,"node_id":"MDQ6VXNlcjk1NzEwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/957103?v=4","gravatar_id":"","url":"https://api.github.com/users/nekron","html_url":"https://github.com/nekron","followers_url":"https://api.github.com/users/nekron/followers","following_url":"https://api.github.com/users/nekron/following{/other_user}","gists_url":"https://api.github.com/users/nekron/gists{/gist_id}","starred_url":"https://api.github.com/users/nekron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekron/subscriptions","organizations_url":"https://api.github.com/users/nekron/orgs","repos_url":"https://api.github.com/users/nekron/repos","events_url":"https://api.github.com/users/nekron/events{/privacy}","received_events_url":"https://api.github.com/users/nekron/received_events","type":"User","site_admin":false},"assignees":[{"login":"nekron","id":957103,"node_id":"MDQ6VXNlcjk1NzEwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/957103?v=4","gravatar_id":"","url":"https://api.github.com/users/nekron","html_url":"https://github.com/nekron","followers_url":"https://api.github.com/users/nekron/followers","following_url":"https://api.github.com/users/nekron/following{/other_user}","gists_url":"https://api.github.com/users/nekron/gists{/gist_id}","starred_url":"https://api.github.com/users/nekron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekron/subscriptions","organizations_url":"https://api.github.com/users/nekron/orgs","repos_url":"https://api.github.com/users/nekron/repos","events_url":"https://api.github.com/users/nekron/events{/privacy}","received_events_url":"https://api.github.com/users/nekron/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":921856364,"node_id":"MDU6TGFiZWw5MjE4NTYzNjQ=","url":"https://api.github.com/repos/instedd/aida-ui/labels/Pending%20PR","name":"Pending PR","color":"ededed","default":false}],"milestone":{"url":"https://api.github.com/repos/instedd/aida-ui/milestones/8","html_url":"https://github.com/instedd/aida-ui/milestone/8","labels_url":"https://api.github.com/repos/instedd/aida-ui/milestones/8/labels","id":3610717,"node_id":"MDk6TWlsZXN0b25lMzYxMDcxNw==","number":8,"title":"1.3","description":"","creator":{"login":"nekron","id":957103,"node_id":"MDQ6VXNlcjk1NzEwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/957103?v=4","gravatar_id":"","url":"https://api.github.com/users/nekron","html_url":"https://github.com/nekron","followers_url":"https://api.github.com/users/nekron/followers","following_url":"https://api.github.com/users/nekron/following{/other_user}","gists_url":"https://api.github.com/users/nekron/gists{/gist_id}","starred_url":"https://api.github.com/users/nekron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekron/subscriptions","organizations_url":"https://api.github.com/users/nekron/orgs","repos_url":"https://api.github.com/users/nekron/repos","events_url":"https://api.github.com/users/nekron/events{/privacy}","received_events_url":"https://api.github.com/users/nekron/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":8,"state":"open","created_at":"2018-08-30T17:03:05Z","updated_at":"2018-09-28T17:58:11Z","due_on":"2018-09-28T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/instedd/aida-ui/pulls/248/commits","review_comments_url":"https://api.github.com/repos/instedd/aida-ui/pulls/248/comments","review_comment_url":"https://api.github.com/repos/instedd/aida-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/instedd/aida-ui/issues/248/comments","statuses_url":"https://api.github.com/repos/instedd/aida-ui/statuses/5f16413ec837d4844d14763742f863590a8346d5","head":{"label":"instedd:feature/244-short-link","ref":"feature/244-short-link","sha":"5f16413ec837d4844d14763742f863590a8346d5","user":{"login":"instedd","id":1354872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTQ4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1354872?v=4","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"repo":{"id":110905073,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA5MDUwNzM=","name":"aida-ui","full_name":"instedd/aida-ui","private":false,"owner":{"login":"instedd","id":1354872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTQ4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1354872?v=4","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/instedd/aida-ui","description":null,"fork":false,"url":"https://api.github.com/repos/instedd/aida-ui","forks_url":"https://api.github.com/repos/instedd/aida-ui/forks","keys_url":"https://api.github.com/repos/instedd/aida-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instedd/aida-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instedd/aida-ui/teams","hooks_url":"https://api.github.com/repos/instedd/aida-ui/hooks","issue_events_url":"https://api.github.com/repos/instedd/aida-ui/issues/events{/number}","events_url":"https://api.github.com/repos/instedd/aida-ui/events","assignees_url":"https://api.github.com/repos/instedd/aida-ui/assignees{/user}","branches_url":"https://api.github.com/repos/instedd/aida-ui/branches{/branch}","tags_url":"https://api.github.com/repos/instedd/aida-ui/tags","blobs_url":"https://api.github.com/repos/instedd/aida-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instedd/aida-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instedd/aida-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/instedd/aida-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instedd/aida-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/instedd/aida-ui/languages","stargazers_url":"https://api.github.com/repos/instedd/aida-ui/stargazers","contributors_url":"https://api.github.com/repos/instedd/aida-ui/contributors","subscribers_url":"https://api.github.com/repos/instedd/aida-ui/subscribers","subscription_url":"https://api.github.com/repos/instedd/aida-ui/subscription","commits_url":"https://api.github.com/repos/instedd/aida-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/instedd/aida-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/instedd/aida-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/instedd/aida-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/instedd/aida-ui/contents/{+path}","compare_url":"https://api.github.com/repos/instedd/aida-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instedd/aida-ui/merges","archive_url":"https://api.github.com/repos/instedd/aida-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instedd/aida-ui/downloads","issues_url":"https://api.github.com/repos/instedd/aida-ui/issues{/number}","pulls_url":"https://api.github.com/repos/instedd/aida-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/instedd/aida-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/instedd/aida-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instedd/aida-ui/labels{/name}","releases_url":"https://api.github.com/repos/instedd/aida-ui/releases{/id}","deployments_url":"https://api.github.com/repos/instedd/aida-ui/deployments","created_at":"2017-11-16T01:03:14Z","updated_at":"2018-09-28T17:53:08Z","pushed_at":"2018-10-01T15:16:33Z","git_url":"git://github.com/instedd/aida-ui.git","ssh_url":"git@github.com:instedd/aida-ui.git","clone_url":"https://github.com/instedd/aida-ui.git","svn_url":"https://github.com/instedd/aida-ui","homepage":null,"size":1978,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":1,"open_issues":26,"watchers":0,"default_branch":"master"}},"base":{"label":"instedd:master","ref":"master","sha":"ec4402e6b57782789dcb4dd69ceaf466e83b501e","user":{"login":"instedd","id":1354872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTQ4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1354872?v=4","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"repo":{"id":110905073,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA5MDUwNzM=","name":"aida-ui","full_name":"instedd/aida-ui","private":false,"owner":{"login":"instedd","id":1354872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTQ4NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1354872?v=4","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/instedd/aida-ui","description":null,"fork":false,"url":"https://api.github.com/repos/instedd/aida-ui","forks_url":"https://api.github.com/repos/instedd/aida-ui/forks","keys_url":"https://api.github.com/repos/instedd/aida-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instedd/aida-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instedd/aida-ui/teams","hooks_url":"https://api.github.com/repos/instedd/aida-ui/hooks","issue_events_url":"https://api.github.com/repos/instedd/aida-ui/issues/events{/number}","events_url":"https://api.github.com/repos/instedd/aida-ui/events","assignees_url":"https://api.github.com/repos/instedd/aida-ui/assignees{/user}","branches_url":"https://api.github.com/repos/instedd/aida-ui/branches{/branch}","tags_url":"https://api.github.com/repos/instedd/aida-ui/tags","blobs_url":"https://api.github.com/repos/instedd/aida-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instedd/aida-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instedd/aida-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/instedd/aida-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instedd/aida-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/instedd/aida-ui/languages","stargazers_url":"https://api.github.com/repos/instedd/aida-ui/stargazers","contributors_url":"https://api.github.com/repos/instedd/aida-ui/contributors","subscribers_url":"https://api.github.com/repos/instedd/aida-ui/subscribers","subscription_url":"https://api.github.com/repos/instedd/aida-ui/subscription","commits_url":"https://api.github.com/repos/instedd/aida-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/instedd/aida-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/instedd/aida-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/instedd/aida-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/instedd/aida-ui/contents/{+path}","compare_url":"https://api.github.com/repos/instedd/aida-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instedd/aida-ui/merges","archive_url":"https://api.github.com/repos/instedd/aida-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instedd/aida-ui/downloads","issues_url":"https://api.github.com/repos/instedd/aida-ui/issues{/number}","pulls_url":"https://api.github.com/repos/instedd/aida-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/instedd/aida-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/instedd/aida-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instedd/aida-ui/labels{/name}","releases_url":"https://api.github.com/repos/instedd/aida-ui/releases{/id}","deployments_url":"https://api.github.com/repos/instedd/aida-ui/deployments","created_at":"2017-11-16T01:03:14Z","updated_at":"2018-09-28T17:53:08Z","pushed_at":"2018-10-01T15:16:33Z","git_url":"git://github.com/instedd/aida-ui.git","ssh_url":"git@github.com:instedd/aida-ui.git","clone_url":"https://github.com/instedd/aida-ui.git","svn_url":"https://github.com/instedd/aida-ui","homepage":null,"size":1978,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":1,"open_issues":26,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/instedd/aida-ui/pulls/248"},"html":{"href":"https://github.com/instedd/aida-ui/pull/248"},"issue":{"href":"https://api.github.com/repos/instedd/aida-ui/issues/248"},"comments":{"href":"https://api.github.com/repos/instedd/aida-ui/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/instedd/aida-ui/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/instedd/aida-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/instedd/aida-ui/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/instedd/aida-ui/statuses/5f16413ec837d4844d14763742f863590a8346d5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nekron"}}