mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 14:18:51 -05:00
Merge pull request #2686 from matrix-org/luke/as-flair
Add automagical AS Publicised Group(s)
This commit is contained in:
commit
cdf6fc15b0
4 changed files with 49 additions and 1 deletions
|
|
@ -375,6 +375,12 @@ class GroupsLocalHandler(object):
|
|||
def get_publicised_groups_for_user(self, user_id):
|
||||
if self.hs.is_mine_id(user_id):
|
||||
result = yield self.store.get_publicised_groups_for_user(user_id)
|
||||
|
||||
# Check AS associated groups for this user - this depends on the
|
||||
# RegExps in the AS registration file (under `users`)
|
||||
for app_service in self.store.get_app_services():
|
||||
result.extend(app_service.get_groups_for_user(user_id))
|
||||
|
||||
defer.returnValue({"groups": result})
|
||||
else:
|
||||
result = yield self.transport_client.get_publicised_groups_for_user(
|
||||
|
|
@ -415,4 +421,9 @@ class GroupsLocalHandler(object):
|
|||
uid
|
||||
)
|
||||
|
||||
# Check AS associated groups for this user - this depends on the
|
||||
# RegExps in the AS registration file (under `users`)
|
||||
for app_service in self.store.get_app_services():
|
||||
results[uid].extend(app_service.get_groups_for_user(uid))
|
||||
|
||||
defer.returnValue({"users": results})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue