misskey
misskey copied to clipboard
feat: 通報の即時解決機能を追加
Close #10942
What
通報の即時解決機能を追加しました。
Why
一定の条件で通報を自動解決することでモデレーターの負担を軽減できる
Additional info (optional)
Checklist
- [x] Read the contribution guide
- [ ] Test working in a local environment
- [x] (If needed) Add story of storybook
- [x] (If needed) Update CHANGELOG.md
- [ ] (If possible) Add tests
Codecov Report
Attention: 244 lines
in your changes are missing coverage. Please review.
Comparison is base (
207e4f3
) 64.30% compared to head (c14bbf3
) 65.81%.
Additional details and impacted files
@@ Coverage Diff @@
## develop #11032 +/- ##
===========================================
+ Coverage 64.30% 65.81% +1.51%
===========================================
Files 977 989 +12
Lines 109254 114744 +5490
Branches 5591 5687 +96
===========================================
+ Hits 70256 75521 +5265
+ Misses 38966 37785 -1181
- Partials 32 1438 +1406
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
MailHogで動作確認しました
@syuilo 他に直した方がいいところとかありますか?無ければマージして欲しいです。
まだ確認できてません🙏
@u1-liquid @SanMurakami ioで動いているようですが正常に動いていますか
(あ、そういえばそのコミットにその問題ありましたね…🤯)
https://github.com/MisskeyIO/misskey/commit/611da72cba3206234576d1c28f0c748b771eb63e
@u1-liquid 通報通知をメールで受け取るかオプションで選べるようにしたのと、通報通知を受け取るメールアドレスを設定できるようにしました。
このPRによるapi.jsonの差分
差分はこちら
--- base
+++ head
@@ -389,6 +389,15 @@
"enableIdenticonGeneration": {
"type": "boolean"
},
+ "doNotSendNotificationEmailsForAbuseReport": {
+ "type": "boolean"
+ },
+ "emailToReceiveAbuseReport": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"manifestJsonOverride": {
"type": "string"
},
@@ -589,6 +598,8 @@
"enableChartsForFederatedInstances",
"enableServerMachineStats",
"enableIdenticonGeneration",
+ "doNotSendNotificationEmailsForAbuseReport",
+ "emailToReceiveAbuseReport",
"manifestJsonOverride",
"policies",
"enableFanoutTimeline",
@@ -2995,6 +3006,841 @@
}
}
},
+ "/admin/abuse-report-resolver/create": {
+ "post": {
+ "operationId": "admin/abuse-report-resolver/create",
+ "summary": "admin/abuse-report-resolver/create",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolver*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/create.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1
+ },
+ "targetUserPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reporterPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reportContentPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "expiresAt": {
+ "type": "string",
+ "enum": [
+ "1hour",
+ "12hours",
+ "1day",
+ "1week",
+ "1month",
+ "3months",
+ "6months",
+ "1year",
+ "indefinitely"
+ ]
+ },
+ "forward": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "targetUserPattern",
+ "reporterPattern",
+ "reportContentPattern",
+ "expiresAt",
+ "forward"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "targetUserPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reporterPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reportContentPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "expiresAt": {
+ "type": "string"
+ },
+ "forward": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "targetUserPattern",
+ "reporterPattern",
+ "reportContentPattern",
+ "expiresAt",
+ "forward"
+ ]
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_REGULAR_EXPRESSION_FOR_TARGET_USER": {
+ "value": {
+ "error": {
+ "message": "Invalid regular expression for target user.",
+ "code": "INVALID_REGULAR_EXPRESSION_FOR_TARGET_USER",
+ "id": "c008484a-0a14-4e74-86f4-b176dc49fcaa"
+ }
+ }
+ },
+ "INVALID_REGULAR_EXPRESSION_FOR_REPORTER": {
+ "value": {
+ "error": {
+ "message": "Invalid regular expression for reporter.",
+ "code": "INVALID_REGULAR_EXPRESSION_FOR_REPORTER",
+ "id": "399b4062-257f-44c8-87cc-4ffae2527fbc"
+ }
+ }
+ },
+ "INVALID_REGULAR_EXPRESSION_FOR_REPORT_CONTENT": {
+ "value": {
+ "error": {
+ "message": "Invalid regular expression for report content.",
+ "code": "INVALID_REGULAR_EXPRESSION_FOR_REPORT_CONTENT",
+ "id": "88c124d8-f517-4c63-a464-0abc274168b"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/admin/abuse-report-resolver/list": {
+ "post": {
+ "operationId": "admin/abuse-report-resolver/list",
+ "summary": "admin/abuse-report-resolver/list",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *read:admin:abuse-report-resolver*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/list.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "limit": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 10
+ },
+ "sinceId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "untilId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK (with results)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "targetUserPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reporterPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reportContentPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "expiresAt": {
+ "type": "string"
+ },
+ "forward": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name",
+ "targetUserPattern",
+ "reporterPattern",
+ "reportContentPattern",
+ "expiresAt",
+ "forward"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/admin/abuse-report-resolver/delete": {
+ "post": {
+ "operationId": "admin/abuse-report-resolver/delete",
+ "summary": "admin/abuse-report-resolver/delete",
+ "description": "No description provided.\n\n**Credential required**: *No* / **Permission**: *write:admin:abuse-report-resolver*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/delete.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "resolverId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "resolverId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "RESOLVER_NOT_FOUND": {
+ "value": {
+ "error": {
+ "message": "Resolver not found.",
+ "code": "RESOLVER_NOT_FOUND",
+ "id": "121fbea9-3e49-4456-998a-d4095c7ac5c5"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/admin/abuse-report-resolver/update": {
+ "post": {
+ "operationId": "admin/abuse-report-resolver/update",
+ "summary": "admin/abuse-report-resolver/update",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:admin:abuse-report-resolver*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/abuse-report-resolver/update.ts"
+ },
+ "tags": [
+ "admin"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "resolverId": {
+ "type": "string",
+ "format": "misskey:id"
+ },
+ "name": {
+ "type": "string"
+ },
+ "targetUserPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reporterPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "reportContentPattern": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "expiresAt": {
+ "type": "string",
+ "enum": [
+ "1hour",
+ "12hours",
+ "1day",
+ "1week",
+ "1month",
+ "3months",
+ "6months",
+ "1year",
+ "indefinitely"
+ ]
+ },
+ "forward": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "resolverId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "RESOLVER_NOT_FOUND": {
+ "value": {
+ "error": {
+ "message": "Resolver not found.",
+ "id": "fd32710e-75e1-4d20-bbd2-f89029acb16e",
+ "code": "RESOLVER_NOT_FOUND"
+ }
+ }
+ },
+ "INVALID_REGULAR_EXPRESSION_FOR_TARGET_USER": {
+ "value": {
+ "error": {
+ "message": "Invalid regular expression for target user.",
+ "code": "INVALID_REGULAR_EXPRESSION_FOR_TARGET_USER",
+ "id": "c008484a-0a14-4e74-86f4-b176dc49fcaa"
+ }
+ }
+ },
+ "INVALID_REGULAR_EXPRESSION_FOR_REPORTER": {
+ "value": {
+ "error": {
+ "message": "Invalid regular expression for reporter.",
+ "code": "INVALID_REGULAR_EXPRESSION_FOR_REPORTER",
+ "id": "399b4062-257f-44c8-87cc-4ffae2527fbc"
+ }
+ }
+ },
+ "INVALID_REGULAR_EXPRESSION_FOR_REPORT_CONTENT": {
+ "value": {
+ "error": {
+ "message": "Invalid regular expression for report content.",
+ "code": "INVALID_REGULAR_EXPRESSION_FOR_REPORT_CONTENT",
+ "id": "88c124d8-f517-4c63-a464-0abc274168b"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/admin/avatar-decorations/create": {
"post": {
"operationId": "admin/avatar-decorations/create",
@@ -12066,6 +12912,15 @@
"enableIdenticonGeneration": {
"type": "boolean"
},
+ "doNotSendNotificationEmailsForAbuseReport": {
+ "type": "boolean"
+ },
+ "emailToReceiveAbuseReport": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"serverRules": {
"type": "array",
"items": {
- コンフリクトを解消
- フロントエンドとバックエンドのビルドエラーを修正