0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/vm: Better conditions for room_id iov append.

This commit is contained in:
Jason Volk 2019-07-15 14:22:45 -07:00
parent 2f71edf41f
commit 6f7949eb2c

View file

@ -351,9 +351,15 @@ ircd::m::vm::inject(eval &eval,
};
assert(eval.room_id);
const json::iov::push room_id
const json::iov::add room_id_
{
event, { "room_id", eval.room_id }
event, eval.room_id && !event.has("room_id"),
{
"room_id", [&eval]() -> json::value
{
return eval.room_id;
}
}
};
const json::iov::add origin_