mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-10-26 02:42:21 +00:00
Add unique member count to status command. (#663)
This commit is contained in:
1 parent
fa5ce9ad9c
commit
c0d4627c62
1 file changed
+6
@@ -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 {
|
||||
<b>Protected Rooms: </b>
|
||||
{info.numberOfProtectedRooms}
|
||||
<br />
|
||||
<b>Protected Users: </b>
|
||||
{info.numberOfUniqueMembers}
|
||||
<br />
|
||||
{renderPolicyLists("Subscribed policy rooms", info.subscribedLists)}
|
||||
{renderPolicyLists(
|
||||
"Subscribed and protected policy rooms",
|
||||
|
||||
Reference in new issue
Block a user