Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
This reverts commit 8592716.

Revert "fix(backend): use insertOne insteadof insert/findOneOrFail combination (misskey-dev#13908)"

This reverts commit 2b8056a.

Revert "enhance(backend): sentry integration for job queues"

This reverts commit d4a8c63.

Revert "fix"

This reverts commit 65d1927.

Revert "enhance(backend): improve sentry integration"

This reverts commit ab69e11.

Revert "enhance(backend): improve sentry integration"

This reverts commit a697a7f.

Revert "lint fixes"

This reverts commit d55e638.

Revert "enhance(backend): improve sentry integration"

This reverts commit 8f833d7.

Revert "feat: 通報を受けた際にメールまたはWebhookで通知を送出出来るようにする (misskey-dev#13758)"

This reverts commit 61fae45.
  • Loading branch information
kanarikanaru committed Jun 13, 2024
1 parent a24e902 commit 58195c9
Show file tree
Hide file tree
Showing 115 changed files with 831 additions and 7,252 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Unreleased

### General
- Feat: 通報を受けた際、または解決した際に、予め登録した宛先に通知を飛ばせるように(mail or webhook) #13705
- Fix: 配信停止したインスタンス一覧が見れなくなる問題を修正

### Client
Expand Down
94 changes: 0 additions & 94 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9313,10 +9313,6 @@ export interface Locale extends ILocale {
* Webhookを作成
*/
"createWebhook": string;
/**
* Webhookを編集
*/
"modifyWebhook": string;
/**
* 名前
*/
Expand Down Expand Up @@ -9363,72 +9359,6 @@ export interface Locale extends ILocale {
*/
"mention": string;
};
"_systemEvents": {
/**
* ユーザーから通報があったとき
*/
"abuseReport": string;
/**
* ユーザーからの通報を処理したとき
*/
"abuseReportResolved": string;
};
/**
* Webhookを削除しますか?
*/
"deleteConfirm": string;
};
"_abuseReport": {
"_notificationRecipient": {
/**
* 通報の通知先を追加
*/
"createRecipient": string;
/**
* 通報の通知先を編集
*/
"modifyRecipient": string;
/**
* 通知先の種類
*/
"recipientType": string;
"_recipientType": {
/**
* メール
*/
"mail": string;
/**
* Webhook
*/
"webhook": string;
"_captions": {
/**
* モデレーター権限を持つユーザーのメールアドレスに通知を送ります(通報を受けた時のみ)
*/
"mail": string;
/**
* 指定したSystemWebhookに通知を送ります(通報を受けた時と通報を解決した時にそれぞれ発信)
*/
"webhook": string;
};
};
/**
* キーワード
*/
"keywords": string;
/**
* 通知先ユーザー
*/
"notifiedUser": string;
/**
* 使用するWebhook
*/
"notifiedWebhook": string;
/**
* 通知先を削除しますか?
*/
"deleteConfirm": string;
};
};
"_moderationLogTypes": {
/**
Expand Down Expand Up @@ -9575,30 +9505,6 @@ export interface Locale extends ILocale {
* ユーザーのバナーを解除
*/
"unsetUserBanner": string;
/**
* SystemWebhookを作成
*/
"createSystemWebhook": string;
/**
* SystemWebhookを更新
*/
"updateSystemWebhook": string;
/**
* SystemWebhookを削除
*/
"deleteSystemWebhook": string;
/**
* 通報の通知先を作成
*/
"createAbuseReportNotificationRecipient": string;
/**
* 通報の通知先を更新
*/
"updateAbuseReportNotificationRecipient": string;
/**
* 通報の通知先を削除
*/
"deleteAbuseReportNotificationRecipient": string;
};
"_fileViewer": {
/**
Expand Down
27 changes: 0 additions & 27 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,6 @@ _drivecleaner:

_webhookSettings:
createWebhook: "Webhookを作成"
modifyWebhook: "Webhookを編集"
name: "名前"
secret: "シークレット"
events: "Webhookを実行するタイミング"
Expand All @@ -2483,26 +2482,6 @@ _webhookSettings:
renote: "Renoteされたとき"
reaction: "リアクションがあったとき"
mention: "メンションされたとき"
_systemEvents:
abuseReport: "ユーザーから通報があったとき"
abuseReportResolved: "ユーザーからの通報を処理したとき"
deleteConfirm: "Webhookを削除しますか?"

_abuseReport:
_notificationRecipient:
createRecipient: "通報の通知先を追加"
modifyRecipient: "通報の通知先を編集"
recipientType: "通知先の種類"
_recipientType:
mail: "メール"
webhook: "Webhook"
_captions:
mail: "モデレーター権限を持つユーザーのメールアドレスに通知を送ります(通報を受けた時のみ)"
webhook: "指定したSystemWebhookに通知を送ります(通報を受けた時と通報を解決した時にそれぞれ発信)"
keywords: "キーワード"
notifiedUser: "通知先ユーザー"
notifiedWebhook: "使用するWebhook"
deleteConfirm: "通知先を削除しますか?"

_moderationLogTypes:
createRole: "ロールを作成"
Expand Down Expand Up @@ -2541,12 +2520,6 @@ _moderationLogTypes:
deleteAvatarDecoration: "アイコンデコレーションを削除"
unsetUserAvatar: "ユーザーのアイコンを解除"
unsetUserBanner: "ユーザーのバナーを解除"
createSystemWebhook: "SystemWebhookを作成"
updateSystemWebhook: "SystemWebhookを更新"
deleteSystemWebhook: "SystemWebhookを削除"
createAbuseReportNotificationRecipient: "通報の通知先を作成"
updateAbuseReportNotificationRecipient: "通報の通知先を更新"
deleteAbuseReportNotificationRecipient: "通報の通知先を削除"

_fileViewer:
title: "ファイルの詳細"
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion packages/backend/src/NestLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LoggerService } from '@nestjs/common';
import Logger from '@/logger.js';

const logger = new Logger('core', 'cyan');
const nestLogger = logger.createSubLogger('nest', 'green');
const nestLogger = logger.createSubLogger('nest', 'green', false);

export class NestLogger implements LoggerService {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/boot/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Error.stackTraceLimit = Infinity;
EventEmitter.defaultMaxListeners = 128;

const logger = new Logger('core', 'cyan');
const clusterLogger = logger.createSubLogger('cluster', 'orange');
const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
const ev = new Xev();

//#region Events
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/boot/master.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const _dirname = dirname(_filename);
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/meta.json`, 'utf-8'));

const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta');
const bootLogger = logger.createSubLogger('boot', 'magenta', false);

const themeColor = chalk.hex('#86b300');

Expand Down
23 changes: 0 additions & 23 deletions packages/backend/src/boot/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,13 @@
*/

import cluster from 'node:cluster';
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { envOption } from '@/env.js';
import { loadConfig } from '@/config.js';
import { jobQueue, server } from './common.js';

/**
* Init worker process
*/
export async function workerMain() {
const config = loadConfig();

if (config.sentryForBackend) {
Sentry.init({
integrations: [
...(config.sentryForBackend.enableNodeProfiling ? [nodeProfilingIntegration()] : []),
],

// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,

maxBreadcrumbs: 0,

...config.sentryForBackend.options,
});
}

if (envOption.onlyServer) {
await server();
} else if (envOption.onlyQueue) {
Expand Down
Loading

0 comments on commit 58195c9

Please sign in to comment.