mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 03:44:56 -04:00
Do not add groups to sync results if disabled. (#12408)
This commit is contained in:
parent
d1cd96ce29
commit
1a90c1e3af
3 changed files with 11 additions and 10 deletions
|
@ -301,14 +301,13 @@ class SyncRestServlet(RestServlet):
|
|||
if archived:
|
||||
response["rooms"][Membership.LEAVE] = archived
|
||||
|
||||
# By the time we get here groups is no longer optional.
|
||||
assert sync_result.groups is not None
|
||||
if sync_result.groups.join:
|
||||
response["groups"][Membership.JOIN] = sync_result.groups.join
|
||||
if sync_result.groups.invite:
|
||||
response["groups"][Membership.INVITE] = sync_result.groups.invite
|
||||
if sync_result.groups.leave:
|
||||
response["groups"][Membership.LEAVE] = sync_result.groups.leave
|
||||
if sync_result.groups is not None:
|
||||
if sync_result.groups.join:
|
||||
response["groups"][Membership.JOIN] = sync_result.groups.join
|
||||
if sync_result.groups.invite:
|
||||
response["groups"][Membership.INVITE] = sync_result.groups.invite
|
||||
if sync_result.groups.leave:
|
||||
response["groups"][Membership.LEAVE] = sync_result.groups.leave
|
||||
|
||||
return response
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue