0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02: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)
{
const m::event &event{*it};
if(!defined(json::get<"state_key"_>(event)))
const m::event::idx &event_idx{it};
if(!state.is(std::nothrow, event_idx))
continue;
const m::event &event{*it};
m::dbs::write_opts opts;
opts.event_idx = it.event_idx();
opts.event_idx = event_idx;
opts.present = true;
opts.history = false;
opts.room_head = false;