diff --git a/include/ircd/m/vm.h b/include/ircd/m/vm.h index 7b2ccf788..ed4af98d3 100644 --- a/include/ircd/m/vm.h +++ b/include/ircd/m/vm.h @@ -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}; diff --git a/modules/federation/invite.cc b/modules/federation/invite.cc index 409c0ef65..ca4f85231 100644 --- a/modules/federation/invite.cc +++ b/modules/federation/invite.cc @@ -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. diff --git a/modules/federation/send.cc b/modules/federation/send.cc index 707887a24..116c53d2d 100644 --- a/modules/federation/send.cc +++ b/modules/federation/send.cc @@ -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;