diff --git a/modules/m_keys.cc b/modules/m_keys.cc index c36564b34..e2e8d4ed0 100644 --- a/modules/m_keys.cc +++ b/modules/m_keys.cc @@ -532,17 +532,16 @@ ircd::m::keys::cache::get(const string_view &server_name, // Without a key_id we search for the most recent key; note this is not // the same as making a state_key="" query, as that would be an actual // ircd.key entry without an id (which shouldn't exist). - const event::idx &event_idx + const event::idx event_idx { key_id? node_room.get(std::nothrow, "ircd.key", key_id): node_room.get(std::nothrow, "ircd.key") }; - if(!event_idx) - return false; - - return m::get(std::nothrow, event_idx, "content", closure); + return event_idx? + m::get(std::nothrow, event_idx, "content", closure): + false; } bool