mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-19 04:57:47 -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
|
@ -41,35 +41,7 @@ class FilterTestCase(unittest.HomeserverTestCase):
|
|||
channel = self.make_request("GET", "/sync")
|
||||
|
||||
self.assertEqual(channel.code, 200)
|
||||
self.assertTrue(
|
||||
{
|
||||
"next_batch",
|
||||
"rooms",
|
||||
"presence",
|
||||
"account_data",
|
||||
"to_device",
|
||||
"device_lists",
|
||||
}.issubset(set(channel.json_body.keys()))
|
||||
)
|
||||
|
||||
def test_sync_presence_disabled(self):
|
||||
"""
|
||||
When presence is disabled, the key does not appear in /sync.
|
||||
"""
|
||||
self.hs.config.use_presence = False
|
||||
|
||||
channel = self.make_request("GET", "/sync")
|
||||
|
||||
self.assertEqual(channel.code, 200)
|
||||
self.assertTrue(
|
||||
{
|
||||
"next_batch",
|
||||
"rooms",
|
||||
"account_data",
|
||||
"to_device",
|
||||
"device_lists",
|
||||
}.issubset(set(channel.json_body.keys()))
|
||||
)
|
||||
self.assertIn("next_batch", channel.json_body)
|
||||
|
||||
|
||||
class SyncFilterTestCase(unittest.HomeserverTestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue