summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-07-01 08:59:54 +0100
committerRichard van der Hoff <richard@matrix.org>2021-07-01 08:59:54 +0100
commit7eea8de9de653bc160dada0bf0f87eb6d1256acc (patch)
treee363a57eb7a28a2b32fcc1e2b349e402728c87ab /synapse/handlers/message.py
parentbump background update rate (diff)
parentFix the homeserver config example in presence router docs (#10288) (diff)
downloadsynapse-7eea8de9de653bc160dada0bf0f87eb6d1256acc.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py

index 2c1b10f652..2a7a6e6982 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