0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 22:18:54 +02:00

Update various event construction sites.

This commit is contained in:
Jason Volk 2019-07-10 01:11:05 -07:00
parent aebfd8d9ff
commit b6f277a975

View file

@ -1562,8 +1562,15 @@ ircd::m::vm::eval::eval(const json::array &pdus,
// Conduct each eval without letting any one exception ruin things for the
// others, including an interrupt. The only exception is a termination.
for(const m::event &event : this->pdus) try
for(auto it(begin(events)); it != end(events); ++it) try
{
auto &event{*it};
if(!json::get<"event_id"_>(event))
event.event_id = event::id::v4
{
this->event_id, event
};
// When a fault::EXISTS would not actually be revealed to the user in
// any way we can elide a lot of grief by checking this here first and
// skipping the event. The query path will be adequately cached anyway.