From 7169940f613af86c0834c01ec4804245397df7e7 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 22 Dec 2025 14:18:41 +0000 Subject: [PATCH 1/3] drive-by: auth_types_for_event: use `StateKey` in return type for clarity --- synapse/event_auth.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synapse/event_auth.py b/synapse/event_auth.py index 66f50115e32..4b354dd6fbd 100644 --- a/synapse/event_auth.py +++ b/synapse/event_auth.py @@ -66,6 +66,7 @@ from synapse.storage.databases.main.events_worker import EventRedactBehaviour from synapse.types import ( MutableStateMap, + StateKey, StateMap, StrCollection, UserID, @@ -1200,8 +1201,8 @@ def get_public_keys(invite_event: "EventBase") -> list[dict[str, Any]]: def auth_types_for_event( room_version: RoomVersion, event: Union["EventBase", "EventBuilder"] -) -> set[tuple[str, str]]: - """Given an event, return a list of (EventType, StateKey) that may be +) -> set[StateKey]: + """Given an event, return a list of (state event type, state key) that may be needed to auth the event. The returned list may be a superset of what would actually be required depending on the full state of the room. From f426bd9b9a765147cda06c90dda0ae22abc32f29 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 22 Dec 2025 14:12:34 +0000 Subject: [PATCH 2/3] drive-by docstring fix on get_catchup_room_event_ids: oldest -> newest --- synapse/storage/databases/main/transactions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/transactions.py b/synapse/storage/databases/main/transactions.py index 2fdd27d3da1..a3d75002b99 100644 --- a/synapse/storage/databases/main/transactions.py +++ b/synapse/storage/databases/main/transactions.py @@ -381,7 +381,7 @@ async def get_catch_up_room_event_ids( ) -> list[str]: """ Returns at most 50 event IDs and their corresponding stream_orderings - that correspond to the oldest events that have not yet been sent to + that correspond to the newest events that have not yet been sent to the destination. Args: From 44937d6aa8e5045312a74d01c2889039dfca6ef5 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 22 Dec 2025 17:38:40 +0000 Subject: [PATCH 3/3] Newsfile --- changelog.d/19320.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/19320.misc diff --git a/changelog.d/19320.misc b/changelog.d/19320.misc new file mode 100644 index 00000000000..e18ad78c912 --- /dev/null +++ b/changelog.d/19320.misc @@ -0,0 +1 @@ +Tweak docstrings and signatures of `auth_types_for_event` and `get_catchup_room_event_ids`.