{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/204821780","pull_request_review_id":139970686,"id":204821780,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDgyMTc4MA==","diff_hunk":"@@ -623,7 +623,14 @@ def invite_to_group(self, group_id, user_id, requester_user_id, content):\n         )\n \n         # TODO: Check if user knocked\n-        # TODO: Check if user is already invited\n+\n+        invited_users = yield self.store.get_invited_users_in_group(group_id)\n+        if user_id in invited_users:\n+            raise SynapseError(400, \"User already invited to group\")","path":"synapse/groups/groups_server.py","position":8,"original_position":8,"commit_id":"885f6e8290af67ab75c1cc58ad71ffd72e3d6084","original_commit_id":"885f6e8290af67ab75c1cc58ad71ffd72e3d6084","user":{"login":"turt2live","id":1190097,"node_id":"MDQ6VXNlcjExOTAwOTc=","avatar_url":"https://avatars2.githubusercontent.com/u/1190097?v=4","gravatar_id":"","url":"https://api.github.com/users/turt2live","html_url":"https://github.com/turt2live","followers_url":"https://api.github.com/users/turt2live/followers","following_url":"https://api.github.com/users/turt2live/following{/other_user}","gists_url":"https://api.github.com/users/turt2live/gists{/gist_id}","starred_url":"https://api.github.com/users/turt2live/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turt2live/subscriptions","organizations_url":"https://api.github.com/users/turt2live/orgs","repos_url":"https://api.github.com/users/turt2live/repos","events_url":"https://api.github.com/users/turt2live/events{/privacy}","received_events_url":"https://api.github.com/users/turt2live/received_events","type":"User","site_admin":false},"body":"Pleeeeeeease provide an error code to SynapseError. I really want to avoid future problems where `M_UNKNOWN` appears in the spec.","created_at":"2018-07-24T16:19:33Z","updated_at":"2018-07-24T16:19:33Z","html_url":"https://github.com/matrix-org/synapse/pull/3436#discussion_r204821780","pull_request_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3436","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/204821780"},"html":{"href":"https://github.com/matrix-org/synapse/pull/3436#discussion_r204821780"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3436"}}},"pull_request":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/3436","id":196894181,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODk0MTgx","html_url":"https://github.com/matrix-org/synapse/pull/3436","diff_url":"https://github.com/matrix-org/synapse/pull/3436.diff","patch_url":"https://github.com/matrix-org/synapse/pull/3436.patch","issue_url":"https://api.github.com/repos/matrix-org/synapse/issues/3436","number":3436,"state":"open","locked":false,"title":"before fulfilling a group invite,check if user is already joined/invited","user":{"login":"t3chguy","id":2403652,"node_id":"MDQ6VXNlcjI0MDM2NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/2403652?v=4","gravatar_id":"","url":"https://api.github.com/users/t3chguy","html_url":"https://github.com/t3chguy","followers_url":"https://api.github.com/users/t3chguy/followers","following_url":"https://api.github.com/users/t3chguy/following{/other_user}","gists_url":"https://api.github.com/users/t3chguy/gists{/gist_id}","starred_url":"https://api.github.com/users/t3chguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3chguy/subscriptions","organizations_url":"https://api.github.com/users/t3chguy/orgs","repos_url":"https://api.github.com/users/t3chguy/repos","events_url":"https://api.github.com/users/t3chguy/events{/privacy}","received_events_url":"https://api.github.com/users/t3chguy/received_events","type":"User","site_admin":false},"body":"### Fixes https://github.com/vector-im/riot-web/issues/5645\r\n\r\nPlease advise if more appropriate error messages can be used\r\n\r\nSigned-off-by: Michael Telatynski <7t3chguy@gmail.com>","created_at":"2018-06-23T10:17:26Z","updated_at":"2018-07-24T16:19:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6dbf455aadd5c494a95d563996548ebba58051c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3436/commits","review_comments_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3436/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/3436/comments","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/885f6e8290af67ab75c1cc58ad71ffd72e3d6084","head":{"label":"matrix-org:t3chguy/fix_groups_invite","ref":"t3chguy/fix_groups_invite","sha":"885f6e8290af67ab75c1cc58ad71ffd72e3d6084","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","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},"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":"2018-07-24T13:13:21Z","pushed_at":"2018-07-24T16:18:41Z","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":20768,"stargazers_count":3105,"watchers_count":3105,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"archived":false,"open_issues_count":941,"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":439,"open_issues":941,"watchers":3105,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"60a1d147a761f11dac8cf785057b844c51f41121","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","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},"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":"2018-07-24T13:13:21Z","pushed_at":"2018-07-24T16:18:41Z","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":20768,"stargazers_count":3105,"watchers_count":3105,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"archived":false,"open_issues_count":941,"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":439,"open_issues":941,"watchers":3105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3436"},"html":{"href":"https://github.com/matrix-org/synapse/pull/3436"},"issue":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/3436"},"comments":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/3436/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3436/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/3436/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/synapse/statuses/885f6e8290af67ab75c1cc58ad71ffd72e3d6084"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"turt2live"}}