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

fix(backend): correct `app`-type notification schema #14471

Closed zyoshoka closed 1 month ago

zyoshoka commented 1 month ago

What

app タイプの通知のスキーマ・型が不正確なのを修正します。

Why

app タイプの通知を発行しているのはこの部分です: https://github.com/misskey-dev/misskey/blob/b6fdd7195725d09ab30245ac174d0ea04ef550ae/packages/backend/src/server/api/endpoints/notifications/create.ts#L42-L47 https://github.com/misskey-dev/misskey/blob/b6fdd7195725d09ab30245ac174d0ea04ef550ae/packages/backend/src/core/entities/NotificationEntityService.ts#L165-L169 次の問題があります:

Additional info (optional)

CHANGELOG の更新は微妙なのでとりあえず見送っています

Checklist

github-actions[bot] commented 1 month ago

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

差分はこちら ```diff --- base +++ head @@ -78515,10 +78515,16 @@ "type": "string" }, "header": { - "type": "string" + "type": [ + "string", + "null" + ] }, "icon": { - "type": "string" + "type": [ + "string", + "null" + ] } }, "required": [ ```

Get diff files from Workflow Page

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 61.71%. Comparing base (b6fdd71) to head (9ddb36d). Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
packages/backend/src/models/Notification.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14471 +/- ## ============================================ + Coverage 39.76% 61.71% +21.94% ============================================ Files 1547 822 -725 Lines 190996 90449 -100547 Branches 3552 1605 -1947 ============================================ - Hits 75948 55818 -20130 + Misses 114484 34611 -79873 + Partials 564 20 -544 ```

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

syuilo commented 1 month ago

🙏🏿