diff --git a/ircd/m_dbs.cc b/ircd/m_dbs.cc index 8cae10f62..7fec7f643 100644 --- a/ircd/m_dbs.cc +++ b/ircd/m_dbs.cc @@ -3068,6 +3068,7 @@ ircd::m::dbs::room_state_key(const mutable_buffer &out_, { mutable_buffer out{out_}; consume(out, copy(out, room_id)); + assert(room_id); if(likely(defined(type))) { diff --git a/ircd/m_room.cc b/ircd/m_room.cc index f2d90cbbc..8607f3c50 100644 --- a/ircd/m_room.cc +++ b/ircd/m_room.cc @@ -1695,6 +1695,8 @@ ircd::m::room::messages::messages(const m::room &room, event::fetch::default_opts } { + assert(room.room_id); + if(room.event_id) seek(room.event_id); else @@ -1714,6 +1716,8 @@ ircd::m::room::messages::messages(const m::room &room, event::fetch::default_opts } { + assert(room.room_id); + seek(event_id); } @@ -1730,6 +1734,8 @@ ircd::m::room::messages::messages(const m::room &room, event::fetch::default_opts } { + assert(room.room_id); + // As a special convenience for the ctor only, if the depth=0 and // nothing is found another attempt is made for depth=1 for synapse // rooms which start at depth=1.