Skip to content

Commit c0d4627

Browse files
authored
Add unique member count to status command. (#663)
1 parent fa5ce9a commit c0d4627

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands/StatusCommand.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface ListInfo {
4242

4343
export interface StatusInfo {
4444
numberOfProtectedRooms: number;
45+
numberOfUniqueMembers: number;
4546
subscribedLists: ListInfo[];
4647
subscribedAndProtectedLists: ListInfo[];
4748
version: string;
@@ -112,6 +113,8 @@ export async function draupnirStatusInfo(
112113
);
113114
return {
114115
numberOfProtectedRooms: draupnir.protectedRoomsSet.allProtectedRooms.length,
116+
numberOfUniqueMembers:
117+
draupnir.protectedRoomsSet.setMembership.currentRevision.uniqueMemberCount(),
115118
subscribedLists: unprotectedListProfiles,
116119
subscribedAndProtectedLists: protectedWatchedLists,
117120
documentationURL: DOCUMENTATION_URL,
@@ -157,6 +160,9 @@ export function renderStatusInfo(info: StatusInfo): DocumentNode {
157160
<b>Protected Rooms: </b>
158161
{info.numberOfProtectedRooms}
159162
<br />
163+
<b>Protected Users: </b>
164+
{info.numberOfUniqueMembers}
165+
<br />
160166
{renderPolicyLists("Subscribed policy rooms", info.subscribedLists)}
161167
{renderPolicyLists(
162168
"Subscribed and protected policy rooms",

0 commit comments

Comments
 (0)