diff options
author | Erik Johnston <erikj@jki.re> | 2017-08-25 16:48:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 16:48:58 +0100 |
commit | 7f0d0ba3bcd3aa56cab0d16346e99ed6a60cc9eb (patch) | |
tree | 62e646b2c99919f1acb2c4eb21d25d4dd701685a /synapse/groups/groups_server.py | |
parent | Merge pull request #2429 from matrix-org/erikj/groups_profile_cache (diff) | |
parent | Add user profiles to summary from group server (diff) | |
download | synapse-7f0d0ba3bcd3aa56cab0d16346e99ed6a60cc9eb.tar.xz |
Merge pull request #2430 from matrix-org/erikj/groups_profile_cache
Add user profiles to summary from group server
Diffstat (limited to 'synapse/groups/groups_server.py')
-rw-r--r-- | synapse/groups/groups_server.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py index 6bccae4bfb..94cf9788bb 100644 --- a/synapse/groups/groups_server.py +++ b/synapse/groups/groups_server.py @@ -45,6 +45,7 @@ class GroupsServerHandler(object): self.server_name = hs.hostname self.attestations = hs.get_groups_attestation_signing() self.transport_client = hs.get_federation_transport_client() + self.profile_handler = hs.get_profile_handler() # Ensure attestations get renewed hs.get_groups_attestation_renewer() @@ -128,6 +129,9 @@ class GroupsServerHandler(object): group_id, user_id, ) + user_profile = yield self.profile_handler.get_profile_from_cache(user_id) + entry.update(user_profile) + users.sort(key=lambda e: e.get("order", 0)) membership_info = yield self.store.get_users_membership_info_in_group( @@ -387,7 +391,8 @@ class GroupsServerHandler(object): entry = {"user_id": g_user_id} - # TODO: Get profile information + profile = yield self.profile_handler.get_profile_from_cache(g_user_id) + entry.update(profile) if not is_public: entry["is_public"] = False |