Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Don't assert an event must have an event ID
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jan 29, 2019
1 parent 840068b commit 610f083
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synapse/events/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from six import string_types

from synapse.api.constants import EventTypes, Membership
from synapse.api.constants import EventFormatVersions, EventTypes, Membership
from synapse.api.errors import SynapseError
from synapse.types import EventID, RoomID, UserID

Expand All @@ -29,7 +29,8 @@ def validate_new(self, event):
"""
self.validate_builder(event)

EventID.from_string(event.event_id)
if event.format_version == EventFormatVersions.V1:
EventID.from_string(event.event_id)

required = [
"auth_events",
Expand Down

0 comments on commit 610f083

Please sign in to comment.