{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/221572019","pull_request_review_id":160249779,"id":221572019,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTU3MjAxOQ==","diff_hunk":"@@ -513,6 +513,34 @@ def get_or_register_3pid_guest(self, medium, address, inviter_user_id):\n \n     @defer.inlineCallbacks\n     def _join_user_to_room(self, requester, room_identifier):\n+\n+        # try to create the room if we're the first user on the server\n+        if self.hs.config.autocreate_auto_join_rooms:\n+            count = yield self.store.count_all_users()\n+            if count == 1 and RoomAlias.is_valid(room_identifier):","path":"synapse/handlers/register.py","position":8,"original_position":8,"commit_id":"faa462ef79529f6b1802764038fd7365dfc37385","original_commit_id":"faa462ef79529f6b1802764038fd7365dfc37385","user":{"login":"richvdh","id":1389908,"node_id":"MDQ6VXNlcjEzODk5MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1389908?v=4","gravatar_id":"","url":"https://api.github.com/users/richvdh","html_url":"https://github.com/richvdh","followers_url":"https://api.github.com/users/richvdh/followers","following_url":"https://api.github.com/users/richvdh/following{/other_user}","gists_url":"https://api.github.com/users/richvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/richvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richvdh/subscriptions","organizations_url":"https://api.github.com/users/richvdh/orgs","repos_url":"https://api.github.com/users/richvdh/repos","events_url":"https://api.github.com/users/richvdh/events{/privacy}","received_events_url":"https://api.github.com/users/richvdh/received_events","type":"User","site_admin":false},"body":"it feels very random to be doing this at this point. (Which is when the first user is registered? when they log in?). what if two users register at once? what if the first user didn't qualify for autojoining for some reason?\r\n\r\nCan we not do this when the HS first starts, somehow?","created_at":"2018-10-01T11:14:07Z","updated_at":"2018-10-01T11:17:48Z","html_url":"https://github.com/matrix-org/synapse/pull/3975#discussion_r221572019","pull_request_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3975","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/221572019"},"html":{"href":"https://github.com/matrix-org/synapse/pull/3975#discussion_r221572019"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3975"}}},"pull_request":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/3975","id":218825364,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4ODI1MzY0","html_url":"https://github.com/matrix-org/synapse/pull/3975","diff_url":"https://github.com/matrix-org/synapse/pull/3975.diff","patch_url":"https://github.com/matrix-org/synapse/pull/3975.patch","issue_url":"https://api.github.com/repos/matrix-org/synapse/issues/3975","number":3975,"state":"open","locked":false,"title":"Autocreate autojoin rooms","user":{"login":"ara4n","id":1294269,"node_id":"MDQ6VXNlcjEyOTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1294269?v=4","gravatar_id":"","url":"https://api.github.com/users/ara4n","html_url":"https://github.com/ara4n","followers_url":"https://api.github.com/users/ara4n/followers","following_url":"https://api.github.com/users/ara4n/following{/other_user}","gists_url":"https://api.github.com/users/ara4n/gists{/gist_id}","starred_url":"https://api.github.com/users/ara4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ara4n/subscriptions","organizations_url":"https://api.github.com/users/ara4n/orgs","repos_url":"https://api.github.com/users/ara4n/repos","events_url":"https://api.github.com/users/ara4n/events{/privacy}","received_events_url":"https://api.github.com/users/ara4n/received_events","type":"User","site_admin":false},"body":"Needed for HHS.","created_at":"2018-09-28T00:43:37Z","updated_at":"2018-10-01T11:17:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8149cd604cba14177ad4b943d05e3067a5c75835","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3975/commits","review_comments_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3975/comments","review_comment_url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/synapse/issues/3975/comments","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/faa462ef79529f6b1802764038fd7365dfc37385","head":{"label":"matrix-org:matthew/autocreate_autojoin","ref":"matthew/autocreate_autojoin","sha":"faa462ef79529f6b1802764038fd7365dfc37385","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":22844864,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg0NDg2NA==","name":"synapse","full_name":"matrix-org/synapse","private":false,"owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/matrix-org/synapse","description":"Synapse: Matrix reference homeserver","fork":false,"url":"https://api.github.com/repos/matrix-org/synapse","forks_url":"https://api.github.com/repos/matrix-org/synapse/forks","keys_url":"https://api.github.com/repos/matrix-org/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/synapse/teams","hooks_url":"https://api.github.com/repos/matrix-org/synapse/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/synapse/events","assignees_url":"https://api.github.com/repos/matrix-org/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/synapse/tags","blobs_url":"https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/synapse/languages","stargazers_url":"https://api.github.com/repos/matrix-org/synapse/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/synapse/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/synapse/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/synapse/subscription","commits_url":"https://api.github.com/repos/matrix-org/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/synapse/merges","archive_url":"https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/synapse/downloads","issues_url":"https://api.github.com/repos/matrix-org/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/synapse/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/synapse/deployments","created_at":"2014-08-11T15:51:42Z","updated_at":"2018-09-30T21:23:12Z","pushed_at":"2018-10-01T11:01:09Z","git_url":"git://github.com/matrix-org/synapse.git","ssh_url":"git@github.com:matrix-org/synapse.git","clone_url":"https://github.com/matrix-org/synapse.git","svn_url":"https://github.com/matrix-org/synapse","homepage":"http://matrix.org","size":22556,"stargazers_count":3275,"watchers_count":3275,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":463,"mirror_url":null,"archived":false,"open_issues_count":945,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":463,"open_issues":945,"watchers":3275,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"36c62a67c4228463d7ca5e43c339e7e0a176ca0d","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":22844864,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg0NDg2NA==","name":"synapse","full_name":"matrix-org/synapse","private":false,"owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/matrix-org/synapse","description":"Synapse: Matrix reference homeserver","fork":false,"url":"https://api.github.com/repos/matrix-org/synapse","forks_url":"https://api.github.com/repos/matrix-org/synapse/forks","keys_url":"https://api.github.com/repos/matrix-org/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/synapse/teams","hooks_url":"https://api.github.com/repos/matrix-org/synapse/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/synapse/events","assignees_url":"https://api.github.com/repos/matrix-org/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/synapse/tags","blobs_url":"https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/synapse/languages","stargazers_url":"https://api.github.com/repos/matrix-org/synapse/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/synapse/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/synapse/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/synapse/subscription","commits_url":"https://api.github.com/repos/matrix-org/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/synapse/merges","archive_url":"https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/synapse/downloads","issues_url":"https://api.github.com/repos/matrix-org/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/synapse/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/synapse/deployments","created_at":"2014-08-11T15:51:42Z","updated_at":"2018-09-30T21:23:12Z","pushed_at":"2018-10-01T11:01:09Z","git_url":"git://github.com/matrix-org/synapse.git","ssh_url":"git@github.com:matrix-org/synapse.git","clone_url":"https://github.com/matrix-org/synapse.git","svn_url":"https://github.com/matrix-org/synapse","homepage":"http://matrix.org","size":22556,"stargazers_count":3275,"watchers_count":3275,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":463,"mirror_url":null,"archived":false,"open_issues_count":945,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":463,"open_issues":945,"watchers":3275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3975"},"html":{"href":"https://github.com/matrix-org/synapse/pull/3975"},"issue":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/3975"},"comments":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/3975/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3975/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3975/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/synapse/statuses/faa462ef79529f6b1802764038fd7365dfc37385"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"richvdh"}}