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:
parent
3e163d842c
commit
7481f55869
1 changed files with 3 additions and 8 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue