{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/reticulum/pulls/comments/219924850","pull_request_review_id":158215737,"id":219924850,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTkyNDg1MA==","diff_hunk":"@@ -10,6 +10,7 @@ defmodule RetWeb.HubChannel do\n     Hub\n     |> Repo.get_by(hub_sid: hub_sid)\n     |> Repo.preload(scene: [:model_owned_file, :screenshot_owned_file])\n+    |> Hub.ensure_valid_entry_code!()","path":"lib/ret_web/channels/hub_channel.ex","position":4,"original_position":4,"commit_id":"8e7688d5103e2d388452854f55216750cfbaab62","original_commit_id":"8e7688d5103e2d388452854f55216750cfbaab62","user":{"login":"gfodor","id":220020,"node_id":"MDQ6VXNlcjIyMDAyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/220020?v=4","gravatar_id":"","url":"https://api.github.com/users/gfodor","html_url":"https://github.com/gfodor","followers_url":"https://api.github.com/users/gfodor/followers","following_url":"https://api.github.com/users/gfodor/following{/other_user}","gists_url":"https://api.github.com/users/gfodor/gists{/gist_id}","starred_url":"https://api.github.com/users/gfodor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfodor/subscriptions","organizations_url":"https://api.github.com/users/gfodor/orgs","repos_url":"https://api.github.com/users/gfodor/repos","events_url":"https://api.github.com/users/gfodor/events{/privacy}","received_events_url":"https://api.github.com/users/gfodor/received_events","type":"User","site_admin":false},"body":"Ah yeah, I built this version with the assumption that these codes are only relevant for like the first hour or so of a room, so didn't worry too much about race conditions or boundary conditions around the expiration time. I think probably what you want is something where we generate a new code before the old one expires with some time window, so old links continue to work but new entrants get new codes. I think this can be an iteration later if this stuff ends up working well.","created_at":"2018-09-24T17:38:31Z","updated_at":"2018-09-24T17:38:31Z","html_url":"https://github.com/mozilla/reticulum/pull/68#discussion_r219924850","pull_request_url":"https://api.github.com/repos/mozilla/reticulum/pulls/68","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/reticulum/pulls/comments/219924850"},"html":{"href":"https://github.com/mozilla/reticulum/pull/68#discussion_r219924850"},"pull_request":{"href":"https://api.github.com/repos/mozilla/reticulum/pulls/68"}},"in_reply_to_id":219912687},"pull_request":{"url":"https://api.github.com/repos/mozilla/reticulum/pulls/68","id":217549445,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NTQ5NDQ1","html_url":"https://github.com/mozilla/reticulum/pull/68","diff_url":"https://github.com/mozilla/reticulum/pull/68.diff","patch_url":"https://github.com/mozilla/reticulum/pull/68.patch","issue_url":"https://api.github.com/repos/mozilla/reticulum/issues/68","number":68,"state":"open","locked":false,"title":"Feature/hub entry codes","user":{"login":"gfodor","id":220020,"node_id":"MDQ6VXNlcjIyMDAyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/220020?v=4","gravatar_id":"","url":"https://api.github.com/users/gfodor","html_url":"https://github.com/gfodor","followers_url":"https://api.github.com/users/gfodor/followers","following_url":"https://api.github.com/users/gfodor/following{/other_user}","gists_url":"https://api.github.com/users/gfodor/gists{/gist_id}","starred_url":"https://api.github.com/users/gfodor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfodor/subscriptions","organizations_url":"https://api.github.com/users/gfodor/orgs","repos_url":"https://api.github.com/users/gfodor/repos","events_url":"https://api.github.com/users/gfodor/events{/privacy}","received_events_url":"https://api.github.com/users/gfodor/received_events","type":"User","site_admin":false},"body":"This PR adds 6-digit temporary entry codes to a hub. The codes roll over after 24 hours and are sent via the hub channel join event. The `/link` path will now redirect to the appropriate hub on `GET` `/link/<entry code>` -- `hub.link` has been updated to preserve the path as well so the short link to invite someone to a room will be `hub.link/<entry code>`","created_at":"2018-09-24T03:12:50Z","updated_at":"2018-09-24T17:38:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fa7169db8308ed8ed8017d5f7063f751525a192","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/reticulum/pulls/68/commits","review_comments_url":"https://api.github.com/repos/mozilla/reticulum/pulls/68/comments","review_comment_url":"https://api.github.com/repos/mozilla/reticulum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/reticulum/issues/68/comments","statuses_url":"https://api.github.com/repos/mozilla/reticulum/statuses/8e7688d5103e2d388452854f55216750cfbaab62","head":{"label":"mozilla:feature/hub-entry-codes","ref":"feature/hub-entry-codes","sha":"8e7688d5103e2d388452854f55216750cfbaab62","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":105199856,"node_id":"MDEwOlJlcG9zaXRvcnkxMDUxOTk4NTY=","name":"reticulum","full_name":"mozilla/reticulum","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/reticulum","description":"Phoenix web server for Social MR","fork":false,"url":"https://api.github.com/repos/mozilla/reticulum","forks_url":"https://api.github.com/repos/mozilla/reticulum/forks","keys_url":"https://api.github.com/repos/mozilla/reticulum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/reticulum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/reticulum/teams","hooks_url":"https://api.github.com/repos/mozilla/reticulum/hooks","issue_events_url":"https://api.github.com/repos/mozilla/reticulum/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/reticulum/events","assignees_url":"https://api.github.com/repos/mozilla/reticulum/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/reticulum/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/reticulum/tags","blobs_url":"https://api.github.com/repos/mozilla/reticulum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/reticulum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/reticulum/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/reticulum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/reticulum/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/reticulum/languages","stargazers_url":"https://api.github.com/repos/mozilla/reticulum/stargazers","contributors_url":"https://api.github.com/repos/mozilla/reticulum/contributors","subscribers_url":"https://api.github.com/repos/mozilla/reticulum/subscribers","subscription_url":"https://api.github.com/repos/mozilla/reticulum/subscription","commits_url":"https://api.github.com/repos/mozilla/reticulum/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/reticulum/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/reticulum/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/reticulum/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/reticulum/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/reticulum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/reticulum/merges","archive_url":"https://api.github.com/repos/mozilla/reticulum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/reticulum/downloads","issues_url":"https://api.github.com/repos/mozilla/reticulum/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/reticulum/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/reticulum/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/reticulum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/reticulum/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/reticulum/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/reticulum/deployments","created_at":"2017-09-28T21:13:09Z","updated_at":"2018-09-24T02:11:40Z","pushed_at":"2018-09-24T03:12:50Z","git_url":"git://github.com/mozilla/reticulum.git","ssh_url":"git@github.com:mozilla/reticulum.git","clone_url":"https://github.com/mozilla/reticulum.git","svn_url":"https://github.com/mozilla/reticulum","homepage":null,"size":10712,"stargazers_count":24,"watchers_count":24,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":6,"open_issues":14,"watchers":24,"default_branch":"master"}},"base":{"label":"mozilla:bug/scene-access-controll","ref":"bug/scene-access-controll","sha":"aebf29dcc39c5275c20045c02c8ff6c432d338e4","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":105199856,"node_id":"MDEwOlJlcG9zaXRvcnkxMDUxOTk4NTY=","name":"reticulum","full_name":"mozilla/reticulum","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/reticulum","description":"Phoenix web server for Social MR","fork":false,"url":"https://api.github.com/repos/mozilla/reticulum","forks_url":"https://api.github.com/repos/mozilla/reticulum/forks","keys_url":"https://api.github.com/repos/mozilla/reticulum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/reticulum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/reticulum/teams","hooks_url":"https://api.github.com/repos/mozilla/reticulum/hooks","issue_events_url":"https://api.github.com/repos/mozilla/reticulum/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/reticulum/events","assignees_url":"https://api.github.com/repos/mozilla/reticulum/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/reticulum/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/reticulum/tags","blobs_url":"https://api.github.com/repos/mozilla/reticulum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/reticulum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/reticulum/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/reticulum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/reticulum/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/reticulum/languages","stargazers_url":"https://api.github.com/repos/mozilla/reticulum/stargazers","contributors_url":"https://api.github.com/repos/mozilla/reticulum/contributors","subscribers_url":"https://api.github.com/repos/mozilla/reticulum/subscribers","subscription_url":"https://api.github.com/repos/mozilla/reticulum/subscription","commits_url":"https://api.github.com/repos/mozilla/reticulum/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/reticulum/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/reticulum/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/reticulum/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/reticulum/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/reticulum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/reticulum/merges","archive_url":"https://api.github.com/repos/mozilla/reticulum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/reticulum/downloads","issues_url":"https://api.github.com/repos/mozilla/reticulum/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/reticulum/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/reticulum/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/reticulum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/reticulum/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/reticulum/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/reticulum/deployments","created_at":"2017-09-28T21:13:09Z","updated_at":"2018-09-24T02:11:40Z","pushed_at":"2018-09-24T03:12:50Z","git_url":"git://github.com/mozilla/reticulum.git","ssh_url":"git@github.com:mozilla/reticulum.git","clone_url":"https://github.com/mozilla/reticulum.git","svn_url":"https://github.com/mozilla/reticulum","homepage":null,"size":10712,"stargazers_count":24,"watchers_count":24,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":6,"open_issues":14,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/reticulum/pulls/68"},"html":{"href":"https://github.com/mozilla/reticulum/pull/68"},"issue":{"href":"https://api.github.com/repos/mozilla/reticulum/issues/68"},"comments":{"href":"https://api.github.com/repos/mozilla/reticulum/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/reticulum/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/reticulum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/reticulum/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/reticulum/statuses/8e7688d5103e2d388452854f55216750cfbaab62"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gfodor"}}