misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.95k stars 1.35k forks source link

feat: 通報の強化 #14704

Closed syuilo closed 1 week ago

syuilo commented 1 week ago

What

Resolve #14689 Resolve #14691 Resolve #11747

Why

Additional info (optional)

Checklist

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 48.51190% with 173 lines in your changes missing coverage. Please review.

Project coverage is 41.40%. Comparing base (d8bf1ff) to head (a1e1e92). Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/components/MkAbuseReport.vue 0.00% 60 Missing :warning:
packages/backend/src/core/AbuseReportService.ts 11.11% 56 Missing :warning:
...er/api/endpoints/admin/update-abuse-user-report.ts 70.68% 17 Missing :warning:
...r/api/endpoints/admin/forward-abuse-user-report.ts 72.72% 15 Missing :warning:
packages/frontend/src/pages/admin/abuses.vue 0.00% 10 Missing :warning:
...ackages/frontend/src/pages/admin/modlog.ModLog.vue 0.00% 5 Missing :warning:
packages/frontend/src/store.ts 0.00% 4 Missing :warning:
.../src/core/entities/AbuseUserReportEntityService.ts 0.00% 2 Missing :warning:
packages/frontend/src/pages/admin-user.vue 0.00% 2 Missing :warning:
...r/api/endpoints/admin/resolve-abuse-user-report.ts 50.00% 1 Missing :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14704 +/- ## =========================================== + Coverage 39.64% 41.40% +1.76% =========================================== Files 1548 1555 +7 Lines 194523 200630 +6107 Branches 3600 2585 -1015 =========================================== + Hits 77110 83079 +5969 - Misses 116814 116985 +171 + Partials 599 566 -33 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 week ago

このPRによるapi.jsonの差分

差分はこちら ```diff --- base +++ head @@ -11230,9 +11230,16 @@ "type": "string", "format": "misskey:id" }, - "forward": { - "type": "boolean", - "default": false + "resolvedAs": { + "type": [ + "string", + "null" + ], + "enum": [ + "accept", + "reject", + null + ] } }, "required": [ @@ -11263,6 +11270,327 @@ "kind": "server", "httpStatusCode": 404 } + } + }, + "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/forward-abuse-user-report": { + "post": { + "operationId": "admin___forward-abuse-user-report", + "summary": "admin/forward-abuse-user-report", + "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*", + "externalDocs": { + "description": "Source code", + "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/forward-abuse-user-report.ts" + }, + "tags": [ + "admin" + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reportId": { + "type": "string", + "format": "misskey:id" + } + }, + "required": [ + "reportId" + ] + } + } + } + }, + "responses": { + "204": { + "description": "OK (without any results)" + }, + "400": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "NO_SUCH_ABUSE_REPORT": { + "value": { + "error": { + "message": "No such abuse report.", + "code": "NO_SUCH_ABUSE_REPORT", + "id": "8763e21b-d9bc-40be-acf6-54c1a6986493", + "kind": "server", + "httpStatusCode": 404 + } + } + }, + "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/update-abuse-user-report": { + "post": { + "operationId": "admin___update-abuse-user-report", + "summary": "admin/update-abuse-user-report", + "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:admin:resolve-abuse-user-report*", + "externalDocs": { + "description": "Source code", + "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/update-abuse-user-report.ts" + }, + "tags": [ + "admin" + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reportId": { + "type": "string", + "format": "misskey:id" + }, + "moderationNote": { + "type": "string" + } + }, + "required": [ + "reportId" + ] + } + } + } + }, + "responses": { + "204": { + "description": "OK (without any results)" + }, + "400": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "NO_SUCH_ABUSE_REPORT": { + "value": { + "error": { + "message": "No such abuse report.", + "code": "NO_SUCH_ABUSE_REPORT", + "id": "15f51cf5-46d1-4b1d-a618-b35bcbed0662", + "kind": "server", + "httpStatusCode": 404 + } } }, "INVALID_PARAM": { ``` [Get diff files from Workflow Page](https://github.com/misskey-dev/misskey/actions/runs/11191424303)
syuilo commented 1 week ago

マージするか

kakkokari-gtyih commented 1 week ago

是認と否認がわかりにくいかも(逆の意味として解釈されるかもしれない)

syuilo commented 1 week ago

ほむん

syuilo commented 1 week ago

まあ✅と❌あるから分かるんじゃないかしら

kakkokari-gtyih commented 1 week ago

ちなみにこれ是認と否認で挙動に差ある?(単純に聞きたいだけ)

syuilo commented 1 week ago

no

syuilo commented 1 week ago

そこら辺の説明をどこかでしたいけど場所がなさそうだからMisskey Hubかしらね

kakkokari-gtyih commented 1 week ago

そこら辺の説明をどこかでしたいけど場所がなさそうだからMisskey Hubかしらね

転送の横の「?」ボタンみたいに説明をツールチップで出せるのでもいいかなと思ったけど全ボタンにツールチップがあるのはそれはそれで変なのでまあそうするのがいいのかも (もしくはMkInfoを置いてそこにちょっと説明書きを添えるか)

syuilo commented 1 week ago

ほむん image

syuilo commented 1 week ago

マージするか

syuilo commented 1 week ago

🙏🏻

tamaina commented 5 days ago

転送どこいった?