0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-05 20:34:29 +01:00

ircd:Ⓜ️:room::state: Minor improve rebuild_present() util.

This commit is contained in:
Jason Volk 2019-05-06 20:48:00 -07:00
parent 8e90f8de5d
commit 22077b58b9

View file

@ -165,12 +165,13 @@ ircd::m::room::state::rebuild_present(const state &state)
for(; it; ++it) for(; it; ++it)
{ {
const m::event &event{*it}; const m::event::idx &event_idx{it};
if(!defined(json::get<"state_key"_>(event))) if(!state.is(std::nothrow, event_idx))
continue; continue;
const m::event &event{*it};
m::dbs::write_opts opts; m::dbs::write_opts opts;
opts.event_idx = it.event_idx(); opts.event_idx = event_idx;
opts.present = true; opts.present = true;
opts.history = false; opts.history = false;
opts.room_head = false; opts.room_head = false;