mirror of
https://github.com/matrix-construct/construct
synced 2025-02-17 01:00:10 +01:00
ircd:Ⓜ️:room::members: Allow empty membership string to count() all members.
This commit is contained in:
parent
67bcbf628c
commit
c26255290b
1 changed files with 4 additions and 0 deletions
|
@ -1490,6 +1490,10 @@ size_t
|
||||||
ircd::m::room::members::count(const string_view &membership)
|
ircd::m::room::members::count(const string_view &membership)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
|
// Allow empty membership string to count all memberships
|
||||||
|
if(!membership)
|
||||||
|
return count();
|
||||||
|
|
||||||
// joined members optimization. Only possible when seeking
|
// joined members optimization. Only possible when seeking
|
||||||
// membership="join" on the present state of the room.
|
// membership="join" on the present state of the room.
|
||||||
if(!room.event_id && membership == "join")
|
if(!room.event_id && membership == "join")
|
||||||
|
|
Loading…
Add table
Reference in a new issue