mirror of
https://github.com/matrix-construct/construct
synced 2025-03-16 22:41:46 +01:00
ircd:Ⓜ️:vm: Add branch to grab room version from input.
This commit is contained in:
parent
362096b34a
commit
5b8092e407
1 changed files with 8 additions and 0 deletions
|
@ -416,6 +416,14 @@ try
|
|||
!eval.room_id?
|
||||
string_view{}:
|
||||
|
||||
// Special case for create event
|
||||
json::get<"type"_>(event) == "m.room.create"?
|
||||
json::string(json::get<"content"_>(_event).get("room_version", "1"_sv)):
|
||||
|
||||
// Special case for v1 distinguishable event_id's
|
||||
_event.event_id && _event.event_id.version() == "1"_sv?
|
||||
"1"_sv:
|
||||
|
||||
// Make a query for the room version into the stack buffer.
|
||||
m::version(room_version_buf, room{eval.room_id}, std::nothrow)
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue