Merge branch 'develop' into feat-1714
This commit is contained in:
commit
2dca1d0a89
|
@ -1,14 +1,14 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
### General
|
### General
|
||||||
-
|
- Fix: 配信停止したインスタンス一覧が見れなくなる問題を修正
|
||||||
|
|
||||||
### Client
|
### Client
|
||||||
- Feat: ノート単体・ユーザーのノート・クリップのノートの埋め込み機能
|
- Feat: ノート単体・ユーザーのノート・クリップのノートの埋め込み機能
|
||||||
- 埋め込みコードやウェブサイトへの実装方法の詳細はMisskey Hubに掲載予定です
|
- 埋め込みコードやウェブサイトへの実装方法の詳細はMisskey Hubに掲載予定です
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
-
|
- チャート生成時にinstance.suspentionStateに置き換えられたinstance.isSuspendedが参照されてしまう問題を修正
|
||||||
|
|
||||||
|
|
||||||
## 2024.5.0
|
## 2024.5.0
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di
|
||||||
|
|
||||||
const suspendedInstancesQuery = this.instancesRepository.createQueryBuilder('instance')
|
const suspendedInstancesQuery = this.instancesRepository.createQueryBuilder('instance')
|
||||||
.select('instance.host')
|
.select('instance.host')
|
||||||
.where('instance.isSuspended = true');
|
.where('instance.suspensionState != \'none\'');
|
||||||
|
|
||||||
const pubsubSubQuery = this.followingsRepository.createQueryBuilder('f')
|
const pubsubSubQuery = this.followingsRepository.createQueryBuilder('f')
|
||||||
.select('f.followerHost')
|
.select('f.followerHost')
|
||||||
|
@ -89,7 +89,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di
|
||||||
.select('COUNT(instance.id)')
|
.select('COUNT(instance.id)')
|
||||||
.where(`instance.host IN (${ subInstancesQuery.getQuery() })`)
|
.where(`instance.host IN (${ subInstancesQuery.getQuery() })`)
|
||||||
.andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) })
|
.andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) })
|
||||||
.andWhere('instance.isSuspended = false')
|
.andWhere('instance.suspensionState = \'none\'')
|
||||||
.andWhere('instance.isNotResponding = false')
|
.andWhere('instance.isNotResponding = false')
|
||||||
.getRawOne()
|
.getRawOne()
|
||||||
.then(x => parseInt(x.count, 10)),
|
.then(x => parseInt(x.count, 10)),
|
||||||
|
@ -97,7 +97,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di
|
||||||
.select('COUNT(instance.id)')
|
.select('COUNT(instance.id)')
|
||||||
.where(`instance.host IN (${ pubInstancesQuery.getQuery() })`)
|
.where(`instance.host IN (${ pubInstancesQuery.getQuery() })`)
|
||||||
.andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) })
|
.andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) })
|
||||||
.andWhere('instance.isSuspended = false')
|
.andWhere('instance.suspensionState = \'none\'')
|
||||||
.andWhere('instance.isNotResponding = false')
|
.andWhere('instance.isNotResponding = false')
|
||||||
.getRawOne()
|
.getRawOne()
|
||||||
.then(x => parseInt(x.count, 10)),
|
.then(x => parseInt(x.count, 10)),
|
||||||
|
|
|
@ -169,6 +169,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
systemLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
systemLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: System: ${job?.name ?? '?'}: ${err.message}`, {
|
Sentry.captureMessage(`Queue: System: ${job?.name ?? '?'}: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -225,6 +226,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
dbLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
dbLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: DB: ${job?.name ?? '?'}: ${err.message}`, {
|
Sentry.captureMessage(`Queue: DB: ${job?.name ?? '?'}: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -264,6 +266,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
deliverLogger.error(`failed(${err.stack}) ${getJobInfo(job)} to=${job ? job.data.to : '-'}`);
|
deliverLogger.error(`failed(${err.stack}) ${getJobInfo(job)} to=${job ? job.data.to : '-'}`);
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: Deliver: ${err.message}`, {
|
Sentry.captureMessage(`Queue: Deliver: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -303,6 +306,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
inboxLogger.error(`failed(${err.stack}) ${getJobInfo(job)} activity=${job ? (job.data.activity ? job.data.activity.id : 'none') : '-'}`, { job, e: renderError(err) });
|
inboxLogger.error(`failed(${err.stack}) ${getJobInfo(job)} activity=${job ? (job.data.activity ? job.data.activity.id : 'none') : '-'}`, { job, e: renderError(err) });
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: Inbox: ${err.message}`, {
|
Sentry.captureMessage(`Queue: Inbox: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -342,6 +346,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
webhookLogger.error(`failed(${err.stack}) ${getJobInfo(job)} to=${job ? job.data.to : '-'}`);
|
webhookLogger.error(`failed(${err.stack}) ${getJobInfo(job)} to=${job ? job.data.to : '-'}`);
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: WebhookDeliver: ${err.message}`, {
|
Sentry.captureMessage(`Queue: WebhookDeliver: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -388,6 +393,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
relationshipLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
relationshipLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: Relationship: ${job?.name ?? '?'}: ${err.message}`, {
|
Sentry.captureMessage(`Queue: Relationship: ${job?.name ?? '?'}: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -428,6 +434,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
||||||
objectStorageLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
objectStorageLogger.error(`failed(${err.stack}) id=${job ? job.id : '-'}`, { job, e: renderError(err) });
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Queue: ObjectStorage: ${job?.name ?? '?'}: ${err.message}`, {
|
Sentry.captureMessage(`Queue: ObjectStorage: ${job?.name ?? '?'}: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
extra: { job, err },
|
extra: { job, err },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||||
|
|
||||||
if (this.config.sentryForBackend) {
|
if (this.config.sentryForBackend) {
|
||||||
Sentry.captureMessage(`Internal error occurred in ${ep.name}: ${err.message}`, {
|
Sentry.captureMessage(`Internal error occurred in ${ep.name}: ${err.message}`, {
|
||||||
|
level: 'error',
|
||||||
user: {
|
user: {
|
||||||
id: userId,
|
id: userId,
|
||||||
},
|
},
|
||||||
|
|
|
@ -117,9 +117,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
if (typeof ps.suspended === 'boolean') {
|
if (typeof ps.suspended === 'boolean') {
|
||||||
if (ps.suspended) {
|
if (ps.suspended) {
|
||||||
query.andWhere('instance.isSuspended = TRUE');
|
query.andWhere('instance.suspensionState != \'none\'');
|
||||||
} else {
|
} else {
|
||||||
query.andWhere('instance.isSuspended = FALSE');
|
query.andWhere('instance.suspensionState = \'none\'');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue