mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 14:31:11 +01:00
modules/m_bridge: Elide io on empty picker kernels.
This commit is contained in:
parent
506d954fb3
commit
62046f9ab8
1 changed files with 6 additions and 4 deletions
|
@ -527,8 +527,9 @@ ircd::m::bridge::pick_user(const config &config,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Bridged user is in the room.
|
// Bridged user is in the room.
|
||||||
return !members.for_each("join", my_host(), [&]
|
return true
|
||||||
(const id::user &user_id)
|
&& !namespaces.empty() // avoid this query io if there's nothing to match.
|
||||||
|
&& !members.for_each("join", my_host(), [&](const id::user &user_id)
|
||||||
{
|
{
|
||||||
return !pick_user(config, event_idx, event, namespaces, user_id);
|
return !pick_user(config, event_idx, event, namespaces, user_id);
|
||||||
});
|
});
|
||||||
|
@ -598,8 +599,9 @@ ircd::m::bridge::pick_alias(const config &config,
|
||||||
room
|
room
|
||||||
};
|
};
|
||||||
|
|
||||||
return !aliases.for_each(my_host(), [&]
|
return true
|
||||||
(const room::alias &alias)
|
&& !namespaces.empty()
|
||||||
|
&& !aliases.for_each(my_host(), [&](const room::alias &alias)
|
||||||
{
|
{
|
||||||
return !pick_alias(config, event_idx, event, namespaces, alias);
|
return !pick_alias(config, event_idx, event, namespaces, alias);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue