Skip to content

Commit

Permalink
Merge pull request matrix-org#2599 from matrix-org/erikj/groups_invite
Browse files Browse the repository at this point in the history
Fix typo when checking if user is invited to group
  • Loading branch information
erikjohnston authored Oct 27, 2017
2 parents 977078f + d0abb4e commit 71a1bd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion synapse/groups/groups_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,10 @@ def accept_invite(self, group_id, requester_user_id, content):

yield self.check_group_is_ours(group_id, requester_user_id, and_exists=True)

if not self.store.is_user_invited_to_local_group(group_id, requester_user_id):
is_invited = yield self.store.is_user_invited_to_local_group(
group_id, requester_user_id,
)
if not is_invited:
raise SynapseError(403, "User not invited to group")

if not self.hs.is_mine_id(requester_user_id):
Expand Down

0 comments on commit 71a1bd5

Please sign in to comment.