0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 19:43:50 +01:00

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})
else:
result = yield self.transport_client.get_publicised_groups_for_user(
get_domain_from_id(user_id), user_id
bulk_result = yield self.transport_client.bulk_get_publicised_groups(
get_domain_from_id(user_id), [user_id],
)
result = bulk_result.get("users", {}).get(user_id)
# TODO: Verify attestations
defer.returnValue(result)
defer.returnValue({"groups": result})
@defer.inlineCallbacks
def bulk_get_publicised_groups(self, user_ids, proxy=True):