mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-18 20:54:37 -04:00
Re-introduce "Leave out optional keys from /sync" change (#10214)
Required some fixes due to merge conflicts with #6739, but nothing too hairy. The first commit is the same as the original (after merge conflict resolution) then two more for compatibility with the latest sync code.
This commit is contained in:
parent
e19e3d452d
commit
394673055d
4 changed files with 53 additions and 55 deletions
|
@ -306,8 +306,9 @@ class TestResourceLimitsServerNoticesWithRealRooms(unittest.HomeserverTestCase):
|
|||
|
||||
channel = self.make_request("GET", "/sync?timeout=0", access_token=tok)
|
||||
|
||||
invites = channel.json_body["rooms"]["invite"]
|
||||
self.assertEqual(len(invites), 0, invites)
|
||||
self.assertNotIn(
|
||||
"rooms", channel.json_body, "Got invites without server notice"
|
||||
)
|
||||
|
||||
def test_invite_with_notice(self):
|
||||
"""Tests that, if the MAU limit is hit, the server notices user invites each user
|
||||
|
@ -364,7 +365,8 @@ class TestResourceLimitsServerNoticesWithRealRooms(unittest.HomeserverTestCase):
|
|||
# We could also pick another user and sync with it, which would return an
|
||||
# invite to a system notices room, but it doesn't matter which user we're
|
||||
# using so we use the last one because it saves us an extra sync.
|
||||
invites = channel.json_body["rooms"]["invite"]
|
||||
if "rooms" in channel.json_body:
|
||||
invites = channel.json_body["rooms"]["invite"]
|
||||
|
||||
# Make sure we have an invite to process.
|
||||
self.assertEqual(len(invites), 1, invites)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue