mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
If room_version isn't specified in the m.room.create event, assume room version 1
This commit is contained in:
parent
e43d8a17ae
commit
1b52775ccd
|
|
@ -72,7 +72,9 @@ func (d *Database) StoreEvent(
|
|||
}
|
||||
}
|
||||
|
||||
roomVersion := strconv.Itoa(int(version.GetDefaultRoomVersion()))
|
||||
// The only room version where the "room_version" key isn't specified is
|
||||
// room version 1
|
||||
roomVersion := 1
|
||||
// The below works because the first event to be persisted to the database
|
||||
// is always the m.room.create event. We can therefore set the room version
|
||||
// correctly at the same time as assigning the room NID.
|
||||
|
|
|
|||
|
|
@ -93,7 +93,9 @@ func (d *Database) StoreEvent(
|
|||
}
|
||||
}
|
||||
|
||||
roomVersion := strconv.Itoa(int(version.GetDefaultRoomVersion()))
|
||||
// The only room version where the "room_version" key isn't specified is
|
||||
// room version 1
|
||||
roomVersion := 1
|
||||
// The below works because the first event to be persisted to the database
|
||||
// is always the m.room.create event. We can therefore set the room version
|
||||
// correctly at the same time as assigning the room NID.
|
||||
|
|
|
|||
Loading…
Reference in a new issue