Skip to content

Commit 0015786

Browse files
authored
fix(backend): チャート生成時にinstance.isSuspendedが読まれてしまう問題の修正 (misskey-dev#13951)
* fix(backend): use sustensionState instead of isSuspended * Update CHANGELOG.md
1 parent 8f833d7 commit 0015786

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-
88

99
### Server
10-
-
10+
- チャート生成時にinstance.suspentionStateに置き換えられたinstance.isSuspendedが参照されてしまう問題を修正
1111

1212

1313
## 2024.5.0

packages/backend/src/core/chart/charts/federation.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di
4747

4848
const suspendedInstancesQuery = this.instancesRepository.createQueryBuilder('instance')
4949
.select('instance.host')
50-
.where('instance.isSuspended = true');
50+
.where('instance.suspensionState != \'none\'');
5151

5252
const pubsubSubQuery = this.followingsRepository.createQueryBuilder('f')
5353
.select('f.followerHost')
@@ -89,15 +89,15 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di
8989
.select('COUNT(instance.id)')
9090
.where(`instance.host IN (${ subInstancesQuery.getQuery() })`)
9191
.andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) })
92-
.andWhere('instance.isSuspended = false')
92+
.andWhere('instance.suspensionState = \'none\'')
9393
.andWhere('instance.isNotResponding = false')
9494
.getRawOne()
9595
.then(x => parseInt(x.count, 10)),
9696
this.instancesRepository.createQueryBuilder('instance')
9797
.select('COUNT(instance.id)')
9898
.where(`instance.host IN (${ pubInstancesQuery.getQuery() })`)
9999
.andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) })
100-
.andWhere('instance.isSuspended = false')
100+
.andWhere('instance.suspensionState = \'none\'')
101101
.andWhere('instance.isNotResponding = false')
102102
.getRawOne()
103103
.then(x => parseInt(x.count, 10)),

0 commit comments

Comments
 (0)