0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:event::append: Add option to elide query for state prev_content.

This commit is contained in:
Jason Volk 2019-09-15 19:47:03 -07:00
parent 56e9f5e009
commit b4b07debbd
2 changed files with 2 additions and 1 deletions

View file

@ -40,6 +40,7 @@ struct ircd::m::event::append::opts
const event::keys *keys {nullptr};
long age {std::numeric_limits<long>::min()};
bool query_txnid {true};
bool query_prev_state {true};
};
inline

View file

@ -209,7 +209,7 @@ ircd::m::event::append::append(json::stack::object &object,
return true;
});
if(is_state && has_event_idx)
if(has_event_idx && opts.query_prev_state && is_state)
{
const auto prev_idx
{