0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 08:58:20 +02:00

ircd:Ⓜ️:event::fetch: Add some assertions on the seek().

This commit is contained in:
Jason Volk 2019-01-16 16:26:24 -08:00
parent c43a0e49ab
commit 8b05ea9d39

View file

@ -1548,13 +1548,17 @@ ircd::m::seek(event::fetch &fetch,
if(query_json)
{
if((fetch.valid = fetch._json.load(key, opts.gopts)))
event = m::event
{
const json::object source
{
json::object{fetch._json.val()}, opts.keys
fetch._json.val()
};
if(fetch.valid)
assert(fetch.valid);
assert(!empty(source));
event = m::event{source, opts.keys};
return fetch.valid;
}
// graceful fallback to row query if json query failed.
assert(!fetch.valid);