0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-18 07:50:57 +01:00

modules/federation/send: Use array eval here.

This commit is contained in:
Jason Volk 2019-02-08 07:55:44 -08:00
parent 80a25cf352
commit 5d3b6c0a0b

View file

@ -55,10 +55,10 @@ handle_edu(client &client,
}
void
handle_pdu(client &client,
handle_pdus(client &client,
const resource::request::object<m::txn> &request,
const string_view &txn_id,
const m::event &event)
const json::array &pdus)
{
m::vm::opts vmopts;
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
@ -69,7 +69,7 @@ handle_pdu(client &client,
vmopts.errorlog &= ~m::vm::fault::STATE;
m::vm::eval eval
{
event, vmopts
pdus, vmopts
};
}
@ -142,12 +142,11 @@ handle_put(client &client,
for(const auto &pdu_failure : pdu_failures)
handle_pdu_failure(client, request, txn_id, pdu_failure);
handle_pdus(client, request, txn_id, pdus);
for(const json::object &edu : edus)
handle_edu(client, request, txn_id, edu);
for(const json::object &pdu : pdus)
handle_pdu(client, request, txn_id, pdu);
return resource::response
{
client, http::OK