mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-09 16:14:57 -04:00
Fix rooms not being properly excluded from incremental sync (#13408)
This commit is contained in:
parent
a648a06d52
commit
845732be45
3 changed files with 37 additions and 10 deletions
|
@ -948,3 +948,24 @@ class ExcludeRoomTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
self.assertNotIn(self.excluded_room_id, channel.json_body["rooms"]["invite"])
|
||||
self.assertIn(self.included_room_id, channel.json_body["rooms"]["invite"])
|
||||
|
||||
def test_incremental_sync(self) -> None:
|
||||
"""Tests that activity in the room is properly filtered out of incremental
|
||||
syncs.
|
||||
"""
|
||||
channel = self.make_request("GET", "/sync", access_token=self.tok)
|
||||
self.assertEqual(channel.code, 200, channel.result)
|
||||
next_batch = channel.json_body["next_batch"]
|
||||
|
||||
self.helper.send(self.excluded_room_id, tok=self.tok)
|
||||
self.helper.send(self.included_room_id, tok=self.tok)
|
||||
|
||||
channel = self.make_request(
|
||||
"GET",
|
||||
f"/sync?since={next_batch}",
|
||||
access_token=self.tok,
|
||||
)
|
||||
self.assertEqual(channel.code, 200, channel.result)
|
||||
|
||||
self.assertNotIn(self.excluded_room_id, channel.json_body["rooms"]["join"])
|
||||
self.assertIn(self.included_room_id, channel.json_body["rooms"]["join"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue