summary refs log tree commit diff
path: root/synapse/event_auth.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-06-30 07:08:42 -0400
committerGitHub <noreply@github.com>2021-06-30 07:08:42 -0400
commitaaf7d1acb8804ddeeb007e21c2b2c915bd494898 (patch)
treea9c681133371c7985b881e9df2554eb7bf5b115d /synapse/event_auth.py
parentFix the inbound PDU metric (#10279) (diff)
downloadsynapse-aaf7d1acb8804ddeeb007e21c2b2c915bd494898.tar.xz
Correct type hints for synapse.event_auth. (#10253)
Diffstat (limited to 'synapse/event_auth.py')
-rw-r--r--synapse/event_auth.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/event_auth.py b/synapse/event_auth.py
index 33d7c60241..89bcf81515 100644
--- a/synapse/event_auth.py
+++ b/synapse/event_auth.py
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 import logging
-from typing import Any, Dict, List, Optional, Set, Tuple
+from typing import Any, Dict, List, Optional, Set, Tuple, Union
 
 from canonicaljson import encode_canonical_json
 from signedjson.key import decode_verify_key_bytes
@@ -29,6 +29,7 @@ from synapse.api.room_versions import (
     RoomVersion,
 )
 from synapse.events import EventBase
+from synapse.events.builder import EventBuilder
 from synapse.types import StateMap, UserID, get_domain_from_id
 
 logger = logging.getLogger(__name__)
@@ -724,7 +725,7 @@ def get_public_keys(invite_event: EventBase) -> List[Dict[str, Any]]:
     return public_keys
 
 
-def auth_types_for_event(event: EventBase) -> Set[Tuple[str, str]]:
+def auth_types_for_event(event: Union[EventBase, EventBuilder]) -> Set[Tuple[str, str]]:
     """Given an event, return a list of (EventType, StateKey) 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.