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`. 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. 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: