0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:room: Passthru as wildcard for empty type string.

This commit is contained in:
Jason Volk 2018-09-25 16:09:46 -07:00
parent 64ccbea79d
commit f54e05b7f0

View file

@ -1162,6 +1162,9 @@ ircd::m::room::state::for_each(const string_view &type,
const event::id::closure_bool &closure) const event::id::closure_bool &closure)
const const
{ {
if(!type)
return for_each(closure);
if(!present()) if(!present())
return !m::state::test(root_id, type, [&closure] return !m::state::test(root_id, type, [&closure]
(const json::array &key, const string_view &event_id) (const json::array &key, const string_view &event_id)
@ -1201,6 +1204,9 @@ ircd::m::room::state::for_each(const string_view &type,
const event::closure_idx_bool &closure) const event::closure_idx_bool &closure)
const const
{ {
if(!type)
return for_each(closure);
if(!present()) if(!present())
return !m::state::test(root_id, type, [&closure] return !m::state::test(root_id, type, [&closure]
(const json::array &key, const string_view &event_id) (const json::array &key, const string_view &event_id)