summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-10-27 17:34:54 +0100
committerGitHub <noreply@github.com>2017-10-27 17:34:54 +0100
commit71a1bd53b20bd0c81ec66c8ea361cd8425d8a59f (patch)
tree8f5eb2ed6ee018637e01261cae96d71c31b7491f
parentFix bad merge (diff)
parentFix typo when checking if user is invited to group (diff)
downloadsynapse-71a1bd53b20bd0c81ec66c8ea361cd8425d8a59f.tar.xz
Merge pull request #2599 from matrix-org/erikj/groups_invite
Fix typo when checking if user is invited to group
-rw-r--r--synapse/groups/groups_server.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index b021b7f77f..cb2ff76a0d 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -642,7 +642,10 @@ class GroupsServerHandler(object):
 
         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):