0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-03-13 21:10:32 +01:00

ircd:Ⓜ️:vm: Move the internal(room) query and indicator to outer scope.

This commit is contained in:
Jason Volk 2020-03-22 12:18:43 -07:00
parent 329982f3f1
commit 55396a9a76

View file

@ -173,6 +173,15 @@ ircd::m::vm::execute(eval &eval,
m::version(room_version_buf, room{eval.room_id}, std::nothrow)
};
// Query for whether the room apropos is an internal room.
const scope_restore room_internal
{
eval.room_internal,
eval.room_id?
m::internal(eval.room_id):
false
};
// We have to set the event_id in the event instance if it didn't come
// with the event JSON.
if(!opts.edu && !event.event_id)
@ -468,11 +477,6 @@ ircd::m::vm::execute_pdu(eval &eval,
at<"type"_>(event)
};
const scope_restore room_internal
{
eval.room_internal, m::internal(room_id)
};
const bool authenticate
{
opts.auth && !eval.room_internal