summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMichael Telatynski <7t3chguy@gmail.com>2018-01-10 15:04:02 +0000
committerMichael Telatynski <7t3chguy@gmail.com>2018-01-10 15:04:51 +0000
commit8c9d5b4873dc5e54c1383e3d31060fd32b08fae1 (patch)
tree9040a8a0b72e1cc2d472a04e9a3670603d52ab02 /synapse
parentMerge pull request #2770 from matrix-org/rav/fix_request_metrics (diff)
downloadsynapse-8c9d5b4873dc5e54c1383e3d31060fd32b08fae1.tar.xz
Fix publicised groups API (singular) over federation
which was missing its fed client API, since there is no other API
it might as well reuse the bulk one and unwrap it

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/groups_local.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/groups_local.py b/synapse/handlers/groups_local.py
index 7e5d3f148d..0d3feacd47 100644
--- a/synapse/handlers/groups_local.py
+++ b/synapse/handlers/groups_local.py
@@ -383,11 +383,11 @@ class GroupsLocalHandler(object):
 
             defer.returnValue({"groups": result})
         else:
-            result = yield self.transport_client.get_publicised_groups_for_user(
-                get_domain_from_id(user_id), user_id
-            )
+            result = yield self.transport_client.bulk_get_publicised_groups(
+                get_domain_from_id(user_id), [user_id],
+            )["users"][user_id]
             # TODO: Verify attestations
-            defer.returnValue(result)
+            defer.returnValue({"groups": result})
 
     @defer.inlineCallbacks
     def bulk_get_publicised_groups(self, user_ids, proxy=True):