0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd:Ⓜ️:room::members: Allow empty membership string to count() all members.

This commit is contained in:
Jason Volk 2018-07-01 14:49:24 -07:00
parent 67bcbf628c
commit c26255290b

View file

@ -1490,6 +1490,10 @@ size_t
ircd::m::room::members::count(const string_view &membership)
const
{
// Allow empty membership string to count all memberships
if(!membership)
return count();
// joined members optimization. Only possible when seeking
// membership="join" on the present state of the room.
if(!room.event_id && membership == "join")