From c26255290b5c22ca4a9ef95630384bbc08337808 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 1 Jul 2018 14:49:24 -0700 Subject: [PATCH] ircd::m::room::members: Allow empty membership string to count() all members. --- ircd/m/room.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ircd/m/room.cc b/ircd/m/room.cc index 97929afea..1c9ca3db9 100644 --- a/ircd/m/room.cc +++ b/ircd/m/room.cc @@ -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")