0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

modules/m_room_bootstrap: Simplify event_id check and return.

This commit is contained in:
Jason Volk 2019-07-31 17:17:46 -07:00
parent 3e163d842c
commit 7481f55869

View file

@ -762,23 +762,18 @@ try
vmopts.eval = false;
vmopts.user_id = user_id;
vmopts.room_version = room_version;
vm::eval eval
const vm::eval eval
{
event, content, vmopts
};
const m::event::id::buf &ret
{
eval
};
if(unlikely(!ret))
if(unlikely(!eval.event_id))
throw m::UNAVAILABLE
{
"Unknown error"
};
return ret;
return eval.event_id;
}
catch(const std::exception &e)
{