mirror of
https://github.com/matrix-construct/construct
synced 2024-11-05 13:28:54 +01:00
ircd:Ⓜ️:vm: Add opts to pass user_id/node_id of evaluator.
This commit is contained in:
parent
b683f1d436
commit
56dd0ed8e7
3 changed files with 9 additions and 1 deletions
|
@ -137,6 +137,12 @@ enum ircd::m::vm::fault
|
|||
/// Evaluation Options
|
||||
struct ircd::m::vm::opts
|
||||
{
|
||||
/// The remote server name which is conducting this eval.
|
||||
string_view node_id;
|
||||
|
||||
/// The mxid of the user which is conducting this eval.
|
||||
string_view user_id;
|
||||
|
||||
/// Call conform hooks (detailed behavior can be tweaked below)
|
||||
bool conform {true};
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ put__invite(client &client,
|
|||
// also try to sync the room as best as possible. The invitee will then be
|
||||
// presented with this invite request in their rooms list.
|
||||
m::vm::opts vmopts;
|
||||
vmopts.prev_check_exists = false;
|
||||
vmopts.node_id = request.origin;
|
||||
|
||||
// We don't want this eval throwing an exception because the response has
|
||||
// already been made for this request.
|
||||
|
|
|
@ -47,6 +47,7 @@ handle_edu(client &client,
|
|||
json::get<"depth"_>(event) = json::undefined_number;
|
||||
|
||||
m::vm::opts vmopts;
|
||||
vmopts.node_id = request.origin;
|
||||
vmopts.notify_clients = false;
|
||||
vmopts.notify_servers = false;
|
||||
vmopts.non_conform.set(m::event::conforms::INVALID_OR_MISSING_EVENT_ID);
|
||||
|
@ -71,6 +72,7 @@ handle_pdus(client &client,
|
|||
const json::array &pdus)
|
||||
{
|
||||
m::vm::opts vmopts;
|
||||
vmopts.node_id = request.origin;
|
||||
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
|
||||
vmopts.nothrows = -1U;
|
||||
vmopts.infolog_accept = true;
|
||||
|
|
Loading…
Reference in a new issue