summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2022-06-09 15:51:34 +0100
committerRichard van der Hoff <richard@matrix.org>2022-06-12 23:13:09 +0100
commit68be42f6b6433e93c7dccc0eae70177500ca60bc (patch)
treec9f73fb98a172ebdab4a95c7007428946e8392b0 /synapse/events
parentEventAuthTestCase: build events for the right room version (diff)
downloadsynapse-68be42f6b6433e93c7dccc0eae70177500ca60bc.tar.xz
Remove `room_version` param from `validate_event_for_room_version`
Instead, use the `room_version` property of the event we're validating.

The `room_version` was originally added as a parameter somewhere around #4482,
but really it's been redundant since #6875 added a `room_version` field to `EventBase`.
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/validator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/events/validator.py b/synapse/events/validator.py

index 29fa9b3880..27c8beba25 100644 --- a/synapse/events/validator.py +++ b/synapse/events/validator.py
@@ -35,6 +35,10 @@ class EventValidator: def validate_new(self, event: EventBase, config: HomeServerConfig) -> None: """Validates the event has roughly the right format + Suitable for checking a locally-created event. It has stricter checks than + is appropriate for an event received over federation (for which, see + event_auth.validate_event_for_room_version) + Args: event: The event to validate. config: The homeserver's configuration.