0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-01 19:22:53 +01:00

ircd:Ⓜ️:vm: Expose json_source dbs option to vmopts interface.

This commit is contained in:
Jason Volk 2019-01-24 11:32:57 -08:00
parent f1a6654f21
commit 64229eb755
2 changed files with 8 additions and 0 deletions

View file

@ -161,6 +161,13 @@ struct ircd::m::vm::opts
/// replayed through the system (not recommended). /// replayed through the system (not recommended).
bool replays {false}; bool replays {false};
/// If the input event has a reference to already-strung json we can use
/// that directly when writing to the DB. When this is false we will
/// re-stringify the event internally either from a referenced source or
/// the tuple if no source is referenced. This should only be set to true
/// if the evaluator already performed this and the json source is good.
bool json_source {false};
// Verify the origin signature // Verify the origin signature
bool verify {true}; bool verify {true};

View file

@ -687,6 +687,7 @@ ircd::m::vm::_write(eval &eval,
wopts.history = opts.history; wopts.history = opts.history;
wopts.head = opts.head; wopts.head = opts.head;
wopts.refs = opts.refs; wopts.refs = opts.refs;
wopts.json_source = opts.json_source;
wopts.event_idx = eval.sequence; wopts.event_idx = eval.sequence;
if(at<"type"_>(event) == "m.room.create") if(at<"type"_>(event) == "m.room.create")