diff --git a/src/components/RightSidebar.tsx b/src/components/RightSidebar.tsx index 425d893..67660a4 100644 --- a/src/components/RightSidebar.tsx +++ b/src/components/RightSidebar.tsx @@ -173,6 +173,35 @@ export function RightSidebar() { )} + + {nodeInfo.admins.length > 0 && ( +
+

+ Admins +

+
+ {nodeInfo.admins.map((admin) => ( + +
+ +
+
+
+ {admin.displayName || admin.handle} +
+
+ @{admin.handle} +
+
+ + ))} +
+
+ )} @@ -204,34 +233,6 @@ export function RightSidebar() { ))} - {nodeInfo.admins.length > 0 && ( -
-

- Admins -

-
- {nodeInfo.admins.map((admin) => ( - -
- -
-
-
- {admin.displayName || admin.handle} -
-
- @{admin.handle} -
-
- - ))} -
-
- )} ); diff --git a/src/lib/swarm/discovery.ts b/src/lib/swarm/discovery.ts index 2f949cf..6c8a2b1 100644 --- a/src/lib/swarm/discovery.ts +++ b/src/lib/swarm/discovery.ts @@ -49,7 +49,9 @@ export async function buildAnnouncement(): Promise { } // Get counts - const userResult = await db.select({ count: sql`count(*)` }).from(users); + const userResult = await db.select({ count: sql`count(*)` }) + .from(users) + .where(sql`${users.handle} NOT LIKE '%@%'`); const postResult = await db.select({ count: sql`count(*)` }).from(posts); const mediaResult = await db.select({ count: sql`count(*)` }) .from(media) diff --git a/src/lib/swarm/registry.ts b/src/lib/swarm/registry.ts index 707c4ff..64b4762 100644 --- a/src/lib/swarm/registry.ts +++ b/src/lib/swarm/registry.ts @@ -361,7 +361,8 @@ export async function getSwarmStats() { const publicNodes = allNodes.filter(n => isPublicSwarmDomain(n.domain)); const [localUsers, localPosts, localMedia] = await Promise.all([ - db.select({ count: sql`count(*)` }).from(users), + db.select({ count: sql`count(*)` }).from(users) + .where(sql`${users.handle} NOT LIKE '%@%'`), db.select({ count: sql`count(*)` }).from(posts), db.select({ count: sql`count(*)` }).from(media).where(isNotNull(media.postId)), ]);