Merge pull request #2772 from matrix-org/t3chguy/patch-1

Fix publicised groups GET API (singular) over federation
This commit is contained in:
Erik Johnston 2018-01-10 15:15:48 +00:00 committed by GitHub
commit b9e4a97922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,11 +383,12 @@ class GroupsLocalHandler(object):
defer.returnValue({"groups": result}) defer.returnValue({"groups": result})
else: else:
result = yield self.transport_client.get_publicised_groups_for_user( bulk_result = yield self.transport_client.bulk_get_publicised_groups(
get_domain_from_id(user_id), user_id get_domain_from_id(user_id), [user_id],
) )
result = bulk_result.get("users", {}).get(user_id)
# TODO: Verify attestations # TODO: Verify attestations
defer.returnValue(result) defer.returnValue({"groups": result})
@defer.inlineCallbacks @defer.inlineCallbacks
def bulk_get_publicised_groups(self, user_ids, proxy=True): def bulk_get_publicised_groups(self, user_ids, proxy=True):