1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-31 03:45:13 +00:00

Fix types

This commit is contained in:
David Baker 2025-03-28 15:13:35 +00:00
parent cb9d25ffed
commit 4ea8507bbd
2 changed files with 3 additions and 8 deletions
synapse/handlers/sliding_sync

View file

@ -303,7 +303,7 @@ class SlidingSyncHandler:
to_token=to_token,
newly_joined=room_id in interested_rooms.newly_joined_rooms,
is_dm=room_id in interested_rooms.dm_room_ids,
receipts=receipts,
room_receipts=receipts[room_id] if room_id in receipts else None,
)
# Filter out empty room results during incremental sync
@ -575,7 +575,7 @@ class SlidingSyncHandler:
to_token: StreamToken,
newly_joined: bool,
is_dm: bool,
receipts: Sequence[ReceiptInRoom],
room_receipts: Sequence[ReceiptInRoom],
) -> SlidingSyncResult.RoomResult:
"""
Fetch room data for the sync response.
@ -1370,7 +1370,7 @@ class SlidingSyncHandler:
joined_count=joined_count,
invited_count=invited_count,
notif_counts=unread_notifs,
room_receipts=receipts[room_id] if room_id in receipts else None,
room_receipts=room_receipts,
)
@trace

View file

@ -104,10 +104,6 @@ class SlidingSyncInterestedRooms:
lists: A mapping from list name to the list result for the response
relevant_room_map: A map from rooms that match the sync request to
their room sync config.
relevant_rooms_to_send_map: Subset of `relevant_room_map` that
includes the rooms that *may* have relevant updates. Rooms not
in this map will definitely not have room updates (though
extensions may have updates in these rooms).
newly_joined_rooms: The set of rooms that were joined in the token range
and the user is still joined to at the end of this range.
newly_left_rooms: The set of rooms that we left in the token range
@ -129,7 +125,6 @@ class SlidingSyncInterestedRooms:
return SlidingSyncInterestedRooms(
lists={},
relevant_room_map={},
relevant_rooms_to_send_map={},
all_rooms=set(),
room_membership_for_user_map={},
newly_joined_rooms=set(),