From c0d4627c625efcbcf07ffea4e79fe1812694fe4e Mon Sep 17 00:00:00 2001 From: Gnuxie <50846879+Gnuxie@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:24:11 +0000 Subject: [PATCH] Add unique member count to status command. (#663) --- src/commands/StatusCommand.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands/StatusCommand.tsx b/src/commands/StatusCommand.tsx index 5f3d7245..fe1c85e5 100644 --- a/src/commands/StatusCommand.tsx +++ b/src/commands/StatusCommand.tsx @@ -42,6 +42,7 @@ export interface ListInfo { export interface StatusInfo { numberOfProtectedRooms: number; + numberOfUniqueMembers: number; subscribedLists: ListInfo[]; subscribedAndProtectedLists: ListInfo[]; version: string; @@ -112,6 +113,8 @@ export async function draupnirStatusInfo( ); return { numberOfProtectedRooms: draupnir.protectedRoomsSet.allProtectedRooms.length, + numberOfUniqueMembers: + draupnir.protectedRoomsSet.setMembership.currentRevision.uniqueMemberCount(), subscribedLists: unprotectedListProfiles, subscribedAndProtectedLists: protectedWatchedLists, documentationURL: DOCUMENTATION_URL, @@ -157,6 +160,9 @@ export function renderStatusInfo(info: StatusInfo): DocumentNode { Protected Rooms: {info.numberOfProtectedRooms}
+ Protected Users: + {info.numberOfUniqueMembers} +
{renderPolicyLists("Subscribed policy rooms", info.subscribedLists)} {renderPolicyLists( "Subscribed and protected policy rooms",