mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️:vm: Add json vm option.
This commit is contained in:
parent
8b1887c5f8
commit
52a9ca9635
2 changed files with 8 additions and 0 deletions
|
@ -157,6 +157,13 @@ struct ircd::m::vm::opts
|
|||
/// true or false for all events in a room.
|
||||
bool history {true};
|
||||
|
||||
/// Toggles whether full json is written to the database. It provides read
|
||||
/// optimization when all columns of an event are sought. Luckily the
|
||||
/// database is well- compressed. It must be used if there are possibly
|
||||
/// unrecognized keys in an event otherwise they will be lost. Note cost
|
||||
/// in space-amplification and redundant data; true unless you know better.
|
||||
bool json {true};
|
||||
|
||||
/// Bypass check for event having already been evaluated so it can be
|
||||
/// replayed through the system (not recommended).
|
||||
bool replays {false};
|
||||
|
|
|
@ -686,6 +686,7 @@ ircd::m::vm::_write(eval &eval,
|
|||
wopts.history = opts.history;
|
||||
wopts.head = opts.head;
|
||||
wopts.refs = opts.refs;
|
||||
wopts.json = opts.json;
|
||||
wopts.event_idx = eval.sequence;
|
||||
|
||||
if(at<"type"_>(event) == "m.room.create")
|
||||
|
|
Loading…
Reference in a new issue