{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/64217672","id":64217672,"diff_hunk":"@@ -399,14 +399,14 @@ def get_or_create_user(self, localpart, displayname, duration_seconds):\n \n             yield registered_user(self.distributor, user)\n         else:\n-            yield self.store.flush_user(user_id=user_id)\n+            yield self.store.user_delete_access_tokens(user_id=user_id)","path":"synapse/handlers/register.py","position":14,"original_position":14,"commit_id":"2e31ef6f717eec96257781a275c1e79a8df12b8b","original_commit_id":"2e31ef6f717eec96257781a275c1e79a8df12b8b","user":{"login":"negzi","id":6698393,"avatar_url":"https://avatars.githubusercontent.com/u/6698393?v=3","gravatar_id":"","url":"https://api.github.com/users/negzi","html_url":"https://github.com/negzi","followers_url":"https://api.github.com/users/negzi/followers","following_url":"https://api.github.com/users/negzi/following{/other_user}","gists_url":"https://api.github.com/users/negzi/gists{/gist_id}","starred_url":"https://api.github.com/users/negzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/negzi/subscriptions","organizations_url":"https://api.github.com/users/negzi/orgs","repos_url":"https://api.github.com/users/negzi/repos","events_url":"https://api.github.com/users/negzi/events{/privacy}","received_events_url":"https://api.github.com/users/negzi/received_events","type":"User","site_admin":false},"body":"If I understood wat you mean here, would the following doc work better?\r\n    Creates a new user if the user does not exist but if the user exists it will replace the user's old access token with a new one.\r\n","created_at":"2016-05-23T13:00:30Z","updated_at":"2016-05-23T13:00:30Z","html_url":"https://github.com/matrix-org/synapse/pull/798#discussion_r64217672","pull_request_url":"https://api.github.com/repos/matrix-org/synapse/pulls/798","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/64217672"},"html":{"href":"https://github.com/matrix-org/synapse/pull/798#discussion_r64217672"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/798"}}},"pull_request":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/798","id":71049326,"html_url":"https://github.com/matrix-org/synapse/pull/798","diff_url":"https://github.com/matrix-org/synapse/pull/798.diff","patch_url":"https://github.com/matrix-org/synapse/pull/798.patch","issue_url":"https://api.github.com/repos/matrix-org/synapse/issues/798","number":798,"state":"open","locked":false,"title":"Fix set profile error with Requester.","user":{"login":"negzi","id":6698393,"avatar_url":"https://avatars.githubusercontent.com/u/6698393?v=3","gravatar_id":"","url":"https://api.github.com/users/negzi","html_url":"https://github.com/negzi","followers_url":"https://api.github.com/users/negzi/followers","following_url":"https://api.github.com/users/negzi/following{/other_user}","gists_url":"https://api.github.com/users/negzi/gists{/gist_id}","starred_url":"https://api.github.com/users/negzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/negzi/subscriptions","organizations_url":"https://api.github.com/users/negzi/orgs","repos_url":"https://api.github.com/users/negzi/repos","events_url":"https://api.github.com/users/negzi/events{/privacy}","received_events_url":"https://api.github.com/users/negzi/received_events","type":"User","site_admin":false},"body":"Replace flush_user with delete access token due to function removal\r\nAdd a new test case for if the user is already registered","created_at":"2016-05-23T12:02:18Z","updated_at":"2016-05-23T13:00:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42f94449436c6510a5ca7e09b198b60d8f66ad24","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/synapse/pulls/798/commits","review_comments_url":"https://api.github.com/repos/matrix-org/synapse/pulls/798/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/798/comments","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/2e31ef6f717eec96257781a275c1e79a8df12b8b","head":{"label":"negzi:bugfix_create_user_feature","ref":"bugfix_create_user_feature","sha":"2e31ef6f717eec96257781a275c1e79a8df12b8b","user":{"login":"negzi","id":6698393,"avatar_url":"https://avatars.githubusercontent.com/u/6698393?v=3","gravatar_id":"","url":"https://api.github.com/users/negzi","html_url":"https://github.com/negzi","followers_url":"https://api.github.com/users/negzi/followers","following_url":"https://api.github.com/users/negzi/following{/other_user}","gists_url":"https://api.github.com/users/negzi/gists{/gist_id}","starred_url":"https://api.github.com/users/negzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/negzi/subscriptions","organizations_url":"https://api.github.com/users/negzi/orgs","repos_url":"https://api.github.com/users/negzi/repos","events_url":"https://api.github.com/users/negzi/events{/privacy}","received_events_url":"https://api.github.com/users/negzi/received_events","type":"User","site_admin":false},"repo":{"id":54387187,"name":"synapse","full_name":"negzi/synapse","owner":{"login":"negzi","id":6698393,"avatar_url":"https://avatars.githubusercontent.com/u/6698393?v=3","gravatar_id":"","url":"https://api.github.com/users/negzi","html_url":"https://github.com/negzi","followers_url":"https://api.github.com/users/negzi/followers","following_url":"https://api.github.com/users/negzi/following{/other_user}","gists_url":"https://api.github.com/users/negzi/gists{/gist_id}","starred_url":"https://api.github.com/users/negzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/negzi/subscriptions","organizations_url":"https://api.github.com/users/negzi/orgs","repos_url":"https://api.github.com/users/negzi/repos","events_url":"https://api.github.com/users/negzi/events{/privacy}","received_events_url":"https://api.github.com/users/negzi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/negzi/synapse","description":"Synapse: Matrix reference homeserver","fork":true,"url":"https://api.github.com/repos/negzi/synapse","forks_url":"https://api.github.com/repos/negzi/synapse/forks","keys_url":"https://api.github.com/repos/negzi/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/negzi/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/negzi/synapse/teams","hooks_url":"https://api.github.com/repos/negzi/synapse/hooks","issue_events_url":"https://api.github.com/repos/negzi/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/negzi/synapse/events","assignees_url":"https://api.github.com/repos/negzi/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/negzi/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/negzi/synapse/tags","blobs_url":"https://api.github.com/repos/negzi/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/negzi/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/negzi/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/negzi/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/negzi/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/negzi/synapse/languages","stargazers_url":"https://api.github.com/repos/negzi/synapse/stargazers","contributors_url":"https://api.github.com/repos/negzi/synapse/contributors","subscribers_url":"https://api.github.com/repos/negzi/synapse/subscribers","subscription_url":"https://api.github.com/repos/negzi/synapse/subscription","commits_url":"https://api.github.com/repos/negzi/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/negzi/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/negzi/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/negzi/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/negzi/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/negzi/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/negzi/synapse/merges","archive_url":"https://api.github.com/repos/negzi/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/negzi/synapse/downloads","issues_url":"https://api.github.com/repos/negzi/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/negzi/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/negzi/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/negzi/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/negzi/synapse/labels{/name}","releases_url":"https://api.github.com/repos/negzi/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/negzi/synapse/deployments","created_at":"2016-03-21T12:33:46Z","updated_at":"2016-03-21T12:33:48Z","pushed_at":"2016-05-23T11:58:21Z","git_url":"git://github.com/negzi/synapse.git","ssh_url":"git@github.com:negzi/synapse.git","clone_url":"https://github.com/negzi/synapse.git","svn_url":"https://github.com/negzi/synapse","homepage":"http://matrix.org","size":10796,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"matrix-org:develop","ref":"develop","sha":"60ff2e7984154f3b4176e9446600b841caf99b3a","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","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,"name":"synapse","full_name":"matrix-org/synapse","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","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},"private":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":"2016-05-23T12:16:31Z","pushed_at":"2016-05-23T12:02:18Z","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":17033,"stargazers_count":843,"watchers_count":843,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":89,"mirror_url":null,"open_issues_count":16,"forks":89,"open_issues":16,"watchers":843,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/798"},"html":{"href":"https://github.com/matrix-org/synapse/pull/798"},"issue":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/798"},"comments":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/798/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/798/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/798/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/synapse/statuses/2e31ef6f717eec96257781a275c1e79a8df12b8b"}}}}
{"actor":{"display_login":"negzi"}}