From be075d9c5fc9af00eb54017fc2fb877b1a442024 Mon Sep 17 00:00:00 2001 From: Kinetix Date: Sun, 26 Jan 2025 13:23:14 -0800 Subject: [PATCH] This seems to function, doesn't include bots --- packages/backend/src/server/NodeinfoServerService.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/NodeinfoServerService.ts b/packages/backend/src/server/NodeinfoServerService.ts index 29d2edd76b..fe7d463b41 100644 --- a/packages/backend/src/server/NodeinfoServerService.ts +++ b/packages/backend/src/server/NodeinfoServerService.ts @@ -67,13 +67,10 @@ export class NodeinfoServerService { ] = await Promise.all([ this.metaService.fetch(true), // 重い - this.usersRepository.count({ where: { host: IsNull(), lastActiveDate: MoreThan(new Date(now - 15552000000)) } }), - this.usersRepository.count({ where: { host: IsNull(), lastActiveDate: MoreThan(new Date(now - 2592000000)) } }), + this.usersRepository.count({ where: { host: IsNull(), isBot: false, lastActiveDate: MoreThan(new Date(now - 15552000000)) } }), + this.usersRepository.count({ where: { host: IsNull(), isBot: false, lastActiveDate: MoreThan(new Date(now - 2592000000)) } }), ]); - // const activeHalfyear = null; - // const activeMonth = null; - const proxyAccount = meta.proxyAccountId ? await this.userEntityService.pack(meta.proxyAccountId).catch(() => null) : null; const basePolicies = { ...DEFAULT_POLICIES, ...meta.policies };