summary refs log tree commit diff
path: root/synapse/groups
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-07-24 13:55:39 +0100
committerErik Johnston <erik@matrix.org>2017-07-24 13:55:39 +0100
commitb76ef6ccb8e00610c791a78b940d396da82fb1ce (patch)
tree94d1194f6e82b181fcbadb4388f8f2ca83d3e7b5 /synapse/groups
parentCheck users/rooms are in group before adding to summary (diff)
downloadsynapse-b76ef6ccb8e00610c791a78b940d396da82fb1ce.tar.xz
Include users membership in group in summary API
Diffstat (limited to 'synapse/groups')
-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