diff --git a/locales/index.d.ts b/locales/index.d.ts index 5e24ecffa..4d8123eb5 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -2276,6 +2276,7 @@ export interface Locale { "unsuspendRemoteInstance": string; "markSensitiveDriveFile": string; "unmarkSensitiveDriveFile": string; + "resolveAbuseReport": string; }; } declare const locales: { diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 1af73c620..647f5fb5f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -2189,3 +2189,4 @@ _moderationLogTypes: unsuspendRemoteInstance: "リモートサーバーを再開" markSensitiveDriveFile: "ファイルをセンシティブ付与" unmarkSensitiveDriveFile: "ファイルをセンシティブ解除" + resolveAbuseReport: "通報を解決" diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 8667640a6..fb5ac7a33 100644 --- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -10,6 +10,7 @@ import { InstanceActorService } from '@/core/InstanceActorService.js'; import { QueueService } from '@/core/QueueService.js'; import { ApRendererService } from '@/core/activitypub/ApRendererService.js'; import { DI } from '@/di-symbols.js'; +import { ModerationLogService } from '@/core/ModerationLogService.js'; export const meta = { tags: ['admin'], @@ -41,6 +42,7 @@ export default class extends Endpoint { // eslint- private queueService: QueueService, private instanceActorService: InstanceActorService, private apRendererService: ApRendererService, + private moderationLogService: ModerationLogService, ) { super(meta, paramDef, async (ps, me) => { const report = await this.abuseUserReportsRepository.findOneBy({ id: ps.reportId }); @@ -61,6 +63,12 @@ export default class extends Endpoint { // eslint- assigneeId: me.id, forwarded: ps.forward && report.targetUserHost != null, }); + + this.moderationLogService.log(me, 'resolveAbuseReport', { + reportId: report.id, + report: report, + forwarded: ps.forward && report.targetUserHost != null, + }); }); } } diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts index b458c0fbc..35ea710f9 100644 --- a/packages/backend/src/types.ts +++ b/packages/backend/src/types.ts @@ -55,6 +55,7 @@ export const moderationLogTypes = [ 'unsuspendRemoteInstance', 'markSensitiveDriveFile', 'unmarkSensitiveDriveFile', + 'resolveAbuseReport', ] as const; export type ModerationLogPayloads = { @@ -192,4 +193,9 @@ export type ModerationLogPayloads = { fileUserUsername: string | null; fileUserHost: string | null; }; + resolveAbuseReport: { + reportId: string; + report: any; + forwarded: boolean; + }; }; diff --git a/packages/frontend/src/pages/admin/modlog.ModLog.vue b/packages/frontend/src/pages/admin/modlog.ModLog.vue index f0de026ad..14f94479f 100644 --- a/packages/frontend/src/pages/admin/modlog.ModLog.vue +++ b/packages/frontend/src/pages/admin/modlog.ModLog.vue @@ -75,6 +75,11 @@ SPDX-License-Identifier: AGPL-3.0-only + +
+ raw +
{{ JSON5.stringify(log, null, '\t') }}
+
diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index f72532f29..0686354ff 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -2607,7 +2607,7 @@ type ModerationLog = { }); // @public (undocumented) -export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile"]; +export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport"]; // @public (undocumented) export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index d2751c447..aedfb5570 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -73,6 +73,7 @@ export const moderationLogTypes = [ 'unsuspendRemoteInstance', 'markSensitiveDriveFile', 'unmarkSensitiveDriveFile', + 'resolveAbuseReport', ] as const; export type ModerationLogPayloads = { @@ -210,4 +211,9 @@ export type ModerationLogPayloads = { fileUserUsername: string | null; fileUserHost: string | null; }; + resolveAbuseReport: { + reportId: string; + report: any; + forwarded: boolean; + }; };