summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Telatynski <7t3chguy@gmail.com>2018-01-10 15:11:35 +0000
committerMichael Telatynski <7t3chguy@gmail.com>2018-01-10 15:11:35 +0000
commit5f07f5694c9a0535e64262c3726007e966ba72ea (patch)
treee435b829ac116dae520a20e0f00faa23009a1488
parentFix publicised groups API (singular) over federation (diff)
downloadsynapse-5f07f5694c9a0535e64262c3726007e966ba72ea.tar.xz
fix order of operations derp and also use `.get` to default to {}
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Diffstat (limited to '')
-rw-r--r--synapse/handlers/groups_local.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/groups_local.py b/synapse/handlers/groups_local.py
index 0d3feacd47..e4d0cc8b02 100644
--- a/synapse/handlers/groups_local.py
+++ b/synapse/handlers/groups_local.py
@@ -383,9 +383,10 @@ class GroupsLocalHandler(object):
 
             defer.returnValue({"groups": result})
         else:
-            result = yield self.transport_client.bulk_get_publicised_groups(
+            bulk_result = yield self.transport_client.bulk_get_publicised_groups(
                 get_domain_from_id(user_id), [user_id],
-            )["users"][user_id]
+            )
+            result = bulk_result.get("users", {}).get(user_id)
             # TODO: Verify attestations
             defer.returnValue({"groups": result})