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

Commit

Permalink
Correctly use default room version if none is set
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jan 28, 2019
1 parent f01c748 commit d758d53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from twisted.internet import defer
from twisted.internet.defer import succeed

from synapse.api.constants import MAX_DEPTH, EventTypes, Membership
from synapse.api.constants import MAX_DEPTH, EventTypes, Membership, RoomVersions
from synapse.api.errors import (
AuthError,
Codes,
Expand Down Expand Up @@ -612,7 +612,7 @@ def handle_new_client_event(
"""

if event.is_state() and (event.type, event.state_key) == (EventTypes.Create, ""):
room_version = event.content["room_version"]
room_version = event.content.get("room_version", RoomVersions.V1)
else:
room_version = yield self.store.get_room_version(event.room_id)

Expand Down

0 comments on commit d758d53

Please sign in to comment.