From d5929f15af9172024d198d7ed72ed1bff491d208 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 12 Jun 2024 18:25:20 -0500 Subject: [PATCH] Adjust wording --- synapse/handlers/sliding_sync.py | 4 ++-- tests/handlers/test_sliding_sync.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 21cf16e008..c216467c29 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -526,8 +526,8 @@ class SlidingSyncHandler: last_activity_in_room_map[room_id] = event_pos.stream else: - # Otherwise, if the user left/banned from the room, they shouldn't see - # past that point. (same for invites/knocks) + # Otherwise, if the user has left/been invited/knocked/been banned from + # a room, they shouldn't see anything past that point. last_activity_in_room_map[room_id] = room_for_user.event_pos.stream return sorted( diff --git a/tests/handlers/test_sliding_sync.py b/tests/handlers/test_sliding_sync.py index f38b607f68..89c823fdc5 100644 --- a/tests/handlers/test_sliding_sync.py +++ b/tests/handlers/test_sliding_sync.py @@ -1189,7 +1189,8 @@ class SortRoomsTestCase(HomeserverTestCase): ) def test_activity_after_xxx(self, room1_membership: Membership) -> None: """ - When someone is invited to a room, they shouldn't take anything into account after the invite. + When someone has left/been invited/knocked/been banned from a room, they + shouldn't take anything into account after that membership event. """ user1_id = self.register_user("user1", "pass") user1_tok = self.login(user1_id, "pass")