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

ircd:Ⓜ️:vm: Mask conform allowing us to issue events on behalf of remote users.

This commit is contained in:
Jason Volk 2018-03-09 08:23:39 -08:00
parent 4e75566c94
commit 30532b47ff

View file

@ -142,14 +142,23 @@ ircd::m::vm::commit(const event &event,
vm::current_sequence,
pretty_oneline(event));
//TODO: X
vm::opts opts_{opts};
opts_.non_conform |= event::conforms::MISSING_PREV_STATE;
vm::eval eval{opts_};
check_size(event);
commit_hook(event);
eval(event);
vm::opts opts_{opts};
// Some functionality on this server may create an event on behalf
// of remote users. It's safe for us to mask this here, but eval'ing
// this event in any replay later will require special casing.
opts_.non_conform |= event::conforms::MISMATCH_ORIGIN_SENDER;
//TODO: X
opts_.non_conform |= event::conforms::MISSING_PREV_STATE;
eval
{
event, opts_
};
return unquote(at<"event_id"_>(event));
}