diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-06-30 07:08:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-30 07:08:42 -0400 |
commit | aaf7d1acb8804ddeeb007e21c2b2c915bd494898 (patch) | |
tree | a9c681133371c7985b881e9df2554eb7bf5b115d /synapse/handlers/message.py | |
parent | Fix the inbound PDU metric (#10279) (diff) | |
download | synapse-aaf7d1acb8804ddeeb007e21c2b2c915bd494898.tar.xz |
Correct type hints for synapse.event_auth. (#10253)
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/message.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index db12abd59d..364c5cd2d3 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -509,6 +509,8 @@ class EventCreationHandler: Should normally be left as None, which will cause them to be calculated based on the room state at the prev_events. + If non-None, prev_event_ids must also be provided. + require_consent: Whether to check if the requester has consented to the privacy policy. @@ -581,6 +583,9 @@ class EventCreationHandler: # Strip down the auth_event_ids to only what we need to auth the event. # For example, we don't need extra m.room.member that don't match event.sender if auth_event_ids is not None: + # If auth events are provided, prev events must be also. + assert prev_event_ids is not None + temp_event = await builder.build( prev_event_ids=prev_event_ids, auth_event_ids=auth_event_ids, @@ -784,6 +789,8 @@ class EventCreationHandler: The event ids to use as the auth_events for the new event. Should normally be left as None, which will cause them to be calculated based on the room state at the prev_events. + + If non-None, prev_event_ids must also be provided. ratelimit: Whether to rate limit this send. txn_id: The transaction ID. ignore_shadow_ban: True if shadow-banned users should be allowed to |