mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01:00
modules/vm: Move the room_id append up the stack.
This commit is contained in:
parent
2d7a914eb2
commit
b5219750be
1 changed files with 15 additions and 6 deletions
|
@ -233,11 +233,6 @@ ircd::m::vm::inject(eval &eval,
|
|||
*eval.copts
|
||||
};
|
||||
|
||||
const json::iov::push room_id
|
||||
{
|
||||
event, { "room_id", room.room_id }
|
||||
};
|
||||
|
||||
const m::room::head head
|
||||
{
|
||||
room
|
||||
|
@ -337,16 +332,30 @@ ircd::m::vm::inject(eval &eval,
|
|||
eval.issue = nullptr;
|
||||
}};
|
||||
|
||||
const scope_restore eval_room_id
|
||||
{
|
||||
eval.room_id,
|
||||
!eval.room_id &&
|
||||
event.has("room_id")?
|
||||
string_view{event.at("room_id")}:
|
||||
string_view{eval.room_id}
|
||||
};
|
||||
|
||||
assert(eval.issue);
|
||||
assert(eval.copts);
|
||||
assert(eval.opts);
|
||||
assert(eval.copts);
|
||||
|
||||
const auto &opts
|
||||
{
|
||||
*eval.copts
|
||||
};
|
||||
|
||||
assert(eval.room_id);
|
||||
const json::iov::push room_id
|
||||
{
|
||||
event, { "room_id", eval.room_id }
|
||||
};
|
||||
|
||||
const json::iov::add origin_
|
||||
{
|
||||
event, opts.add_origin,
|
||||
|
|
Loading…
Add table
Reference in a new issue