summary refs log tree commit diff
path: root/synapse/groups/groups_server.py
diff options
context:
space:
mode:
authorLuke Barnard <luke@matrix.org>2017-11-07 11:18:45 +0000
committerLuke Barnard <luke@matrix.org>2017-11-07 11:18:45 +0000
commit5561c09091c084d38ebbe3e449aa85f2955b4dd6 (patch)
tree5cad44da73f1eac788909a1f5d09e926f176ce6d /synapse/groups/groups_server.py
parentMerge pull request #2576 from maximevaillancourt/exclude-noscript-url-preview (diff)
downloadsynapse-5561c09091c084d38ebbe3e449aa85f2955b4dd6.tar.xz
Return whether a user is an admin within a group
Diffstat (limited to 'synapse/groups/groups_server.py')
-rw-r--r--synapse/groups/groups_server.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index addc70ce94..11199dd215 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -426,14 +426,15 @@ class GroupsServerHandler(object):
         for user_result in user_results:
             g_user_id = user_result["user_id"]
             is_public = user_result["is_public"]
+            is_privileged = user_result["is_admin"]
 
             entry = {"user_id": g_user_id}
 
             profile = yield self.profile_handler.get_profile_from_cache(g_user_id)
             entry.update(profile)
 
-            if not is_public:
-                entry["is_public"] = False
+            entry["is_public"] = bool(is_public)
+            entry["is_privileged"] = bool(is_privileged)
 
             if not self.is_mine_id(g_user_id):
                 attestation = yield self.store.get_remote_attestation(group_id, g_user_id)