summary refs log tree commit diff
path: root/synapse/groups/groups_server.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-07-24 18:09:12 +0100
committerGitHub <noreply@github.com>2017-07-24 18:09:12 +0100
commitebbaae5526a0975c0f218a2b9bde52d61c9bbde7 (patch)
tree14f7062f7375b60adc0199d5166665b4a8cfa7dd /synapse/groups/groups_server.py
parentCorrectly add joins to correct segment (diff)
parentUpdate comment (diff)
downloadsynapse-ebbaae5526a0975c0f218a2b9bde52d61c9bbde7.tar.xz
Merge pull request #2382 from matrix-org/erikj/group_privilege
Include users membership in group in summary API
Diffstat (limited to 'synapse/groups/groups_server.py')
-rw-r--r--synapse/groups/groups_server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index b1ee43ef90..f25f327eb9 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -130,6 +130,10 @@ class GroupsServerHandler(object):
 
         users.sort(key=lambda e: e.get("order", 0))
 
+        membership_info = yield self.store.get_users_membership_info_in_group(
+            group_id, requester_user_id,
+        )
+
         defer.returnValue({
             "profile": profile,
             "users_section": {
@@ -142,6 +146,7 @@ class GroupsServerHandler(object):
                 "categories": categories,
                 "total_room_count_estimate": 0,  # TODO
             },
+            "user": membership_info,
         })
 
     @defer.inlineCallbacks