0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-28 15:53:46 +02:00

ircd:Ⓜ️:room: Skip invalid fetches in room purge.

This commit is contained in:
Jason Volk 2021-02-02 05:14:12 -08:00
parent 6424e0bde9
commit 4562c0c2e5

View file

@ -18,16 +18,19 @@ ircd::m::room::purge(const room &room)
};
room.for_each([&txn, &ret]
(const m::event::idx &idx)
(const m::event::idx &event_idx)
{
const m::event::fetch event
{
idx
std::nothrow, event_idx
};
if(!event.valid)
return;
m::dbs::write_opts opts;
opts.op = db::op::DELETE;
opts.event_idx = idx;
opts.event_idx = event_idx;
m::dbs::write(txn, event, opts);
++ret;
});