mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 13:40:33 -04:00
Leave out optional keys from /sync (#9919)
This leaves out all optional keys from /sync. This should be fine for all clients tested against conduit already, but it may break some clients, as such we should check, that at least most of them don't break horribly and maybe back out some of the individual changes. (We can probably always leave out groups for example, while the others may cause more issues.) Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
This commit is contained in:
parent
a61b13c0a1
commit
e9eb3549d3
4 changed files with 51 additions and 50 deletions
|
@ -37,35 +37,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