From 14a3af679df09aa7f19150ffd46ecfb49e5ca082 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:06:34 +0900 Subject: [PATCH 01/25] update deps --- packages/frontend/package.json | 8 +++--- pnpm-lock.yaml | 50 +++++++++++++++++----------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 09e0d92255..682def8e8d 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -33,7 +33,7 @@ "astring": "1.8.6", "broadcast-channel": "7.0.0", "buraha": "0.0.1", - "canvas-confetti": "1.6.1", + "canvas-confetti": "1.9.2", "chart.js": "4.4.2", "chartjs-adapter-date-fns": "3.0.0", "chartjs-chart-matrix": "2.0.1", @@ -60,17 +60,17 @@ "rollup": "4.12.0", "sanitize-html": "2.12.1", "sass": "1.71.1", - "shiki": "1.0.0-beta.3", + "shiki": "1.1.7", "strict-event-emitter-types": "2.0.0", "textarea-caret": "3.1.0", - "three": "0.161.0", + "three": "0.162.0", "throttle-debounce": "5.0.0", "tinycolor2": "1.6.0", "tsc-alias": "1.8.8", "tsconfig-paths": "4.2.0", "typescript": "5.3.3", "uuid": "9.0.1", - "v-code-diff": "1.7.2", + "v-code-diff": "1.9.0", "vite": "5.1.4", "vue": "3.4.21", "vuedraggable": "next" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dce81e95f7..3ff570c108 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -725,8 +725,8 @@ importers: specifier: 0.0.1 version: 0.0.1 canvas-confetti: - specifier: 1.6.1 - version: 1.6.1 + specifier: 1.9.2 + version: 1.9.2 chart.js: specifier: 4.4.2 version: 4.4.2 @@ -806,8 +806,8 @@ importers: specifier: 1.71.1 version: 1.71.1 shiki: - specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3 + specifier: 1.1.7 + version: 1.1.7 strict-event-emitter-types: specifier: 2.0.0 version: 2.0.0 @@ -815,8 +815,8 @@ importers: specifier: 3.1.0 version: 3.1.0 three: - specifier: 0.161.0 - version: 0.161.0 + specifier: 0.162.0 + version: 0.162.0 throttle-debounce: specifier: 5.0.0 version: 5.0.0 @@ -836,8 +836,8 @@ importers: specifier: 9.0.1 version: 9.0.1 v-code-diff: - specifier: 1.7.2 - version: 1.7.2(vue@3.4.21) + specifier: 1.9.0 + version: 1.9.0(vue@3.4.21) vite: specifier: 5.1.4 version: 5.1.4(@types/node@20.11.22)(sass@1.71.1)(terser@5.28.1) @@ -5324,8 +5324,8 @@ packages: string-argv: 0.3.1 dev: true - /@shikijs/core@1.0.0-beta.3: - resolution: {integrity: sha512-SCwPom2Wn8XxNlEeqdzycU93SKgzYeVsedjqDsgZaz4XiiPpZUzlHt2NAEQTwTnPcHNZapZ6vbkwJ8P11ggL3Q==} + /@shikijs/core@1.1.7: + resolution: {integrity: sha512-gTYLUIuD1UbZp/11qozD3fWpUTuMqPSf3svDMMrL0UmlGU7D9dPw/V1FonwAorCUJBltaaESxq90jrSjQyGixg==} dev: false /@sideway/address@4.1.4: @@ -9466,8 +9466,8 @@ packages: resolution: {integrity: sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==} dev: false - /canvas-confetti@1.6.1: - resolution: {integrity: sha512-CgGR5DL9+dkne4AwcpvWQc0LIQq43yDIxlwdZcyrq3yklricNfuPHoOSoM6Ya7yCQ+sXmZ2iNV2feiKjVG8C1g==} + /canvas-confetti@1.9.2: + resolution: {integrity: sha512-6Xi7aHHzKwxZsem4mCKoqP6YwUG3HamaHHAlz1hTNQPCqXhARFpSXnkC9TWlahHY5CG6hSL5XexNjxK8irVErg==} dev: false /caseless@0.12.0: @@ -12493,8 +12493,8 @@ packages: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} dev: false - /highlight.js@11.8.0: - resolution: {integrity: sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==} + /highlight.js@11.9.0: + resolution: {integrity: sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==} engines: {node: '>=12.0.0'} dev: false @@ -17662,10 +17662,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - /shiki@1.0.0-beta.3: - resolution: {integrity: sha512-z7cHTNSSvwGx2DfeLwjSNLo+HcVxifgNIzLm6Ye52eXcIwNHXT0wHbhy7FDOKSKveuEHBwt9opfj3Hoc8LE1Yg==} + /shiki@1.1.7: + resolution: {integrity: sha512-9kUTMjZtcPH3i7vHunA6EraTPpPOITYTdA5uMrvsJRexktqP0s7P3s9HVK80b4pP42FRVe03D7fT3NmJv2yYhw==} dependencies: - '@shikijs/core': 1.0.0-beta.3 + '@shikijs/core': 1.1.7 dev: false /side-channel@1.0.4: @@ -18500,8 +18500,8 @@ packages: real-require: 0.2.0 dev: false - /three@0.161.0: - resolution: {integrity: sha512-LC28VFtjbOyEu5b93K0bNRLw1rQlMJ85lilKsYj6dgTu+7i17W+JCCEbvrpmNHF1F3NAUqDSWq50UD7w9H2xQw==} + /three@0.162.0: + resolution: {integrity: sha512-xfCYj4RnlozReCmUd+XQzj6/5OjDNHBy5nT6rVwrOKGENAvpXe2z1jL+DZYaMu4/9pNsjH/4Os/VvS9IrH7IOQ==} dev: false /throttle-debounce@5.0.0: @@ -19180,8 +19180,8 @@ packages: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true - /v-code-diff@1.7.2(vue@3.4.21): - resolution: {integrity: sha512-y+q8ZHf8GfphYLhcZbjAKcId/h6vZujS71Ryq5u+dI6Jg4ZLTdLrBNVSzYpHywHSSFFfBMdilm6XvVryEaH4+A==} + /v-code-diff@1.9.0(vue@3.4.21): + resolution: {integrity: sha512-alg6krCxFvwTob/rJq+3LzjdIbLb/ni8tS8YmBbI0wckOkbJuN1cShFJ6XEkm82tMgpv5NYEeWLEWhggeV7BDg==} requiresBuild: true peerDependencies: '@vue/composition-api': ^1.4.9 @@ -19192,9 +19192,9 @@ packages: dependencies: diff: 5.1.0 diff-match-patch: 1.0.5 - highlight.js: 11.8.0 + highlight.js: 11.9.0 vue: 3.4.21(typescript@5.3.3) - vue-demi: 0.13.11(vue@3.4.21) + vue-demi: 0.14.7(vue@3.4.21) dev: false /v8-to-istanbul@9.2.0: @@ -19449,8 +19449,8 @@ packages: resolution: {integrity: sha512-6bnLkn8O0JJyiFSIF0EfCogzeqNXpnjJ0vW/SZzNHfe6sPx30lTtTXlE5TFs2qhJlAtDFybStVNpL73cPe3OMQ==} dev: true - /vue-demi@0.13.11(vue@3.4.21): - resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==} + /vue-demi@0.14.7(vue@3.4.21): + resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} engines: {node: '>=12'} hasBin: true requiresBuild: true From 2f31606effaa4836e8b1bcc0ab1cceab82fa262f Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:16:44 +0900 Subject: [PATCH 02/25] update deps --- packages/backend/package.json | 8 ++--- pnpm-lock.yaml | 58 ++++++++++++++++------------------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index d2aaf36940..8680610441 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -81,9 +81,9 @@ "@fastify/view": "8.2.0", "@misskey-dev/sharp-read-bmp": "1.2.0", "@misskey-dev/summaly": "5.0.3", - "@nestjs/common": "10.2.10", - "@nestjs/core": "10.2.10", - "@nestjs/testing": "10.2.10", + "@nestjs/common": "10.3.3", + "@nestjs/core": "10.3.3", + "@nestjs/testing": "10.3.3", "@peertube/http-signature": "1.7.0", "@simplewebauthn/server": "9.0.3", "@sinonjs/fake-timers": "11.2.2", @@ -159,7 +159,7 @@ "ratelimiter": "3.4.1", "re2": "1.20.9", "redis-lock": "0.1.4", - "reflect-metadata": "0.1.14", + "reflect-metadata": "0.2.1", "rename": "1.0.4", "rss-parser": "3.13.0", "rxjs": "7.8.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ff570c108..5e29c1162b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,14 +117,14 @@ importers: specifier: 5.0.3 version: 5.0.3 '@nestjs/common': - specifier: 10.2.10 - version: 10.2.10(reflect-metadata@0.1.14)(rxjs@7.8.1) + specifier: 10.3.3 + version: 10.3.3(reflect-metadata@0.2.1)(rxjs@7.8.1) '@nestjs/core': - specifier: 10.2.10 - version: 10.2.10(@nestjs/common@10.2.10)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.1.14)(rxjs@7.8.1) + specifier: 10.3.3 + version: 10.3.3(@nestjs/common@10.3.3)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.2.1)(rxjs@7.8.1) '@nestjs/testing': - specifier: 10.2.10 - version: 10.2.10(@nestjs/common@10.2.10)(@nestjs/core@10.2.10)(@nestjs/platform-express@10.3.3) + specifier: 10.3.3 + version: 10.3.3(@nestjs/common@10.3.3)(@nestjs/core@10.3.3)(@nestjs/platform-express@10.3.3) '@peertube/http-signature': specifier: 1.7.0 version: 1.7.0 @@ -351,8 +351,8 @@ importers: specifier: 0.1.4 version: 0.1.4 reflect-metadata: - specifier: 0.1.14 - version: 0.1.14 + specifier: 0.2.1 + version: 0.2.1 rename: specifier: 1.0.4 version: 1.0.4 @@ -513,7 +513,7 @@ importers: version: 1.0.0(@typescript-eslint/eslint-plugin@7.1.0)(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) '@nestjs/platform-express': specifier: 10.3.3 - version: 10.3.3(@nestjs/common@10.2.10)(@nestjs/core@10.2.10) + version: 10.3.3(@nestjs/common@10.3.3)(@nestjs/core@10.3.3) '@simplewebauthn/types': specifier: 9.0.1 version: 9.0.1 @@ -4857,12 +4857,12 @@ packages: tar-fs: 2.1.1 dev: true - /@nestjs/common@10.2.10(reflect-metadata@0.1.14)(rxjs@7.8.1): - resolution: {integrity: sha512-fwAk931rjW8CNH2Mgwawq/7HWHH1dxkOLdcgs7U52ddLk8CtHXjejm1cbNahewlSbNhvlOl7y1STLHutE6sUqw==} + /@nestjs/common@10.3.3(reflect-metadata@0.2.1)(rxjs@7.8.1): + resolution: {integrity: sha512-LAkTe8/CF0uNWM0ecuDwUNTHCi1lVSITmmR4FQ6Ftz1E7ujQCnJ5pMRzd8JRN14vdBkxZZ8VbVF0BDUKoKNxMQ==} peerDependencies: class-transformer: '*' class-validator: '*' - reflect-metadata: ^0.1.12 + reflect-metadata: ^0.1.12 || ^0.2.0 rxjs: ^7.1.0 peerDependenciesMeta: class-transformer: @@ -4871,20 +4871,20 @@ packages: optional: true dependencies: iterare: 1.2.1 - reflect-metadata: 0.1.14 + reflect-metadata: 0.2.1 rxjs: 7.8.1 tslib: 2.6.2 uid: 2.0.2 - /@nestjs/core@10.2.10(@nestjs/common@10.2.10)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.1.14)(rxjs@7.8.1): - resolution: {integrity: sha512-+ckOI6BPi2ZMHikT9MCG4ctHDc4OnjhoIytrn7f2AYMMXI4bnutJhqyQKc30VDka5x3Wq6QAD57pgSP7y+JjJg==} + /@nestjs/core@10.3.3(@nestjs/common@10.3.3)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.2.1)(rxjs@7.8.1): + resolution: {integrity: sha512-kxJWggQAPX3RuZx9JVec69eSLaYLNIox2emkZJpfBJ5Qq7cAq7edQIt1r4LGjTKq6kFubNTPsqhWf5y7yFRBPw==} requiresBuild: true peerDependencies: '@nestjs/common': ^10.0.0 '@nestjs/microservices': ^10.0.0 '@nestjs/platform-express': ^10.0.0 '@nestjs/websockets': ^10.0.0 - reflect-metadata: ^0.1.12 + reflect-metadata: ^0.1.12 || ^0.2.0 rxjs: ^7.1.0 peerDependenciesMeta: '@nestjs/microservices': @@ -4894,27 +4894,27 @@ packages: '@nestjs/websockets': optional: true dependencies: - '@nestjs/common': 10.2.10(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/platform-express': 10.3.3(@nestjs/common@10.2.10)(@nestjs/core@10.2.10) + '@nestjs/common': 10.3.3(reflect-metadata@0.2.1)(rxjs@7.8.1) + '@nestjs/platform-express': 10.3.3(@nestjs/common@10.3.3)(@nestjs/core@10.3.3) '@nuxtjs/opencollective': 0.3.2 fast-safe-stringify: 2.1.1 iterare: 1.2.1 path-to-regexp: 3.2.0 - reflect-metadata: 0.1.14 + reflect-metadata: 0.2.1 rxjs: 7.8.1 tslib: 2.6.2 uid: 2.0.2 transitivePeerDependencies: - encoding - /@nestjs/platform-express@10.3.3(@nestjs/common@10.2.10)(@nestjs/core@10.2.10): + /@nestjs/platform-express@10.3.3(@nestjs/common@10.3.3)(@nestjs/core@10.3.3): resolution: {integrity: sha512-GGKSEU48Os7nYFIsUM0nutuFUGn5AbeP8gzFBiBCAtiuJWrXZXpZ58pMBYxAbMf7IrcOZFInHEukjHGAQU0OZw==} peerDependencies: '@nestjs/common': ^10.0.0 '@nestjs/core': ^10.0.0 dependencies: - '@nestjs/common': 10.2.10(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 10.2.10(@nestjs/common@10.2.10)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 10.3.3(reflect-metadata@0.2.1)(rxjs@7.8.1) + '@nestjs/core': 10.3.3(@nestjs/common@10.3.3)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.2.1)(rxjs@7.8.1) body-parser: 1.20.2 cors: 2.8.5 express: 4.18.2 @@ -4923,8 +4923,8 @@ packages: transitivePeerDependencies: - supports-color - /@nestjs/testing@10.2.10(@nestjs/common@10.2.10)(@nestjs/core@10.2.10)(@nestjs/platform-express@10.3.3): - resolution: {integrity: sha512-IVLUnPz/+fkBtPATYfqTIP+phN9yjkXejmj+JyhmcfPJZpxBmD1i9VSMqa4u54l37j0xkGPscQ0IXpbhqMYUKw==} + /@nestjs/testing@10.3.3(@nestjs/common@10.3.3)(@nestjs/core@10.3.3)(@nestjs/platform-express@10.3.3): + resolution: {integrity: sha512-kX20GfjAImL5grd/i69uD/x7sc00BaqGcP2dRG3ilqshQUuy5DOmspLCr3a2C8xmVU7kzK4spT0oTxhe6WcCAA==} peerDependencies: '@nestjs/common': ^10.0.0 '@nestjs/core': ^10.0.0 @@ -4936,9 +4936,9 @@ packages: '@nestjs/platform-express': optional: true dependencies: - '@nestjs/common': 10.2.10(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 10.2.10(@nestjs/common@10.2.10)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/platform-express': 10.3.3(@nestjs/common@10.2.10)(@nestjs/core@10.2.10) + '@nestjs/common': 10.3.3(reflect-metadata@0.2.1)(rxjs@7.8.1) + '@nestjs/core': 10.3.3(@nestjs/common@10.3.3)(@nestjs/platform-express@10.3.3)(reflect-metadata@0.2.1)(rxjs@7.8.1) + '@nestjs/platform-express': 10.3.3(@nestjs/common@10.3.3)(@nestjs/core@10.3.3) tslib: 2.6.2 dev: false @@ -17103,12 +17103,8 @@ packages: redis-errors: 1.2.0 dev: false - /reflect-metadata@0.1.14: - resolution: {integrity: sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==} - /reflect-metadata@0.2.1: resolution: {integrity: sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==} - dev: false /regenerate-unicode-properties@10.1.0: resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==} From 16440d6be2b5e0461c2f96add006155539af6243 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:24:59 +0900 Subject: [PATCH 03/25] Update CHANGELOG.md Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 800c646c67..4bbc18850d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ ### General - Enhance: 投稿者のロールに応じて、一つのノートに含むことのできるメンションとダイレクト投稿の宛先の人数に上限を設定できるように - * デフォルトのメンション上限は20アカウントに設定されます。(管理者はベースロールの設定で変更可能です。) + * デフォルトのメンション上限は20アカウントに設定されます。(管理者はベースロールの設定で変更可能です。) * 連合の問い合わせに応答しないサーバーのリモートユーザーへのメンションは、上限の人数に含めない実装になっています。 - Enhance: 通知がミュート、凍結を考慮するようになりました - Enhance: サーバーごとにモデレーションノートを残せるように From 5befd66e2120ba6e44b4c324264ca862374a1869 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:25:54 +0900 Subject: [PATCH 04/25] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bbc18850d..359b8acf56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - Fix: 設定のバックアップ作成時に名前を入力しなかった場合、ローカライゼーションがおかしくなる問題を修正 - Fix: ページ`/admin/emojis`の絵文字編集ダイアログで「リアクションとして使えるロール」を追加する際に何も選択せずOKを押下すると画面が固まる問題を修正 - Fix: 絵文字サジェストの順位で、絵文字自体の名前が同じものよりもタグで一致しているものが優先されてしまう問題を修正 +- Fix: ユーザの情報のポップアップが消えなくなることがある問題を修正 ### Server - Enhance: エンドポイント`flash/update`の`flashId`以外のパラメータは必須ではなくなりました @@ -119,7 +120,6 @@ - Fix: エラー画像URLを設定した後解除すると,デフォルトの画像が表示されない問題の修正 - Fix: MkCodeEditorで行がずれていってしまう問題の修正 - Fix: Summaly proxy利用時にプレイヤーが動作しないことがあるのを修正 #13196 -- Fix: ユーザの情報のポップアップが消えなくなることがある問題を修正 ### Server - Enhance: 連合先のレートリミットを超過した際にリトライするようになりました From ca6399437cfb4836e19e707c5a985050bfcc9834 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:26:13 +0900 Subject: [PATCH 05/25] format --- packages/backend/src/types.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts index d894ef730e..929070d0d2 100644 --- a/packages/backend/src/types.ts +++ b/packages/backend/src/types.ts @@ -18,7 +18,6 @@ * achievementEarned - 実績を獲得 * app - アプリ通知 * test - テスト通知(サーバー側) - * */ export const notificationTypes = [ 'note', From 5904d98208769b96cbbb1b7a8471408f0a5dfe1c Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:26:27 +0900 Subject: [PATCH 06/25] Update packages/backend/test/e2e/mute.ts Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com> --- packages/backend/test/e2e/mute.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/test/e2e/mute.ts b/packages/backend/test/e2e/mute.ts index 1e4225184a..1d28e07b7d 100644 --- a/packages/backend/test/e2e/mute.ts +++ b/packages/backend/test/e2e/mute.ts @@ -117,6 +117,7 @@ describe('Mute', () => { assert.strictEqual(res.body.some((notification: any) => notification.userId === bob.id), true); assert.strictEqual(res.body.some((notification: any) => notification.userId === carol.id), false); }); + test('通知にミュートしているユーザーからのリプライが含まれない', async () => { const aliceNote = await post(alice, { text: 'hi' }); await post(bob, { text: '@alice hi', replyId: aliceNote.id }); From 6158ef138ec8088c0e3c615b2605c0fa1a6f402c Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:27:03 +0900 Subject: [PATCH 07/25] format --- packages/frontend/test/autocomplete.test.ts | 40 ++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/frontend/test/autocomplete.test.ts b/packages/frontend/test/autocomplete.test.ts index f6a7ce9450..394ac3a821 100644 --- a/packages/frontend/test/autocomplete.test.ts +++ b/packages/frontend/test/autocomplete.test.ts @@ -7,28 +7,28 @@ import { assert, describe, test } from 'vitest'; import { searchEmoji } from '@/scripts/search-emoji.js'; describe('emoji autocomplete', () => { - test('名前の完全一致は名前の前方一致より優先される', async () => { - const result = searchEmoji('foooo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':foooobaaar:', name: 'foooobaaar' }]); - assert.equal(result[0].emoji, ':foooo:'); - }); + test('名前の完全一致は名前の前方一致より優先される', async () => { + const result = searchEmoji('foooo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':foooobaaar:', name: 'foooobaaar' }]); + assert.equal(result[0].emoji, ':foooo:'); + }); - test('名前の前方一致は名前の部分一致より優先される', async () => { - const result = searchEmoji('baaa', [{ emoji: ':baaar:', name: 'baaar' }, { emoji: ':foooobaaar:', name: 'foooobaaar' }]); - assert.equal(result[0].emoji, ':baaar:'); - }); + test('名前の前方一致は名前の部分一致より優先される', async () => { + const result = searchEmoji('baaa', [{ emoji: ':baaar:', name: 'baaar' }, { emoji: ':foooobaaar:', name: 'foooobaaar' }]); + assert.equal(result[0].emoji, ':baaar:'); + }); - test('名前の完全一致はタグの完全一致より優先される', async () => { - const result = searchEmoji('foooo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':baaar:', name: 'foooo', aliasOf: 'baaar' }]); - assert.equal(result[0].emoji, ':foooo:'); - }); + test('名前の完全一致はタグの完全一致より優先される', async () => { + const result = searchEmoji('foooo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':baaar:', name: 'foooo', aliasOf: 'baaar' }]); + assert.equal(result[0].emoji, ':foooo:'); + }); - test('名前の前方一致はタグの前方一致より優先される', async () => { - const result = searchEmoji('foo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':baaar:', name: 'foooo', aliasOf: 'baaar' }]); - assert.equal(result[0].emoji, ':foooo:'); - }); + test('名前の前方一致はタグの前方一致より優先される', async () => { + const result = searchEmoji('foo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':baaar:', name: 'foooo', aliasOf: 'baaar' }]); + assert.equal(result[0].emoji, ':foooo:'); + }); - test('名前の部分一致はタグの部分一致より優先される', async () => { - const result = searchEmoji('oooo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':baaar:', name: 'foooo', aliasOf: 'baaar' }]); - assert.equal(result[0].emoji, ':foooo:'); - }); + test('名前の部分一致はタグの部分一致より優先される', async () => { + const result = searchEmoji('oooo', [{ emoji: ':foooo:', name: 'foooo' }, { emoji: ':baaar:', name: 'foooo', aliasOf: 'baaar' }]); + assert.equal(result[0].emoji, ':foooo:'); + }); }); From d1bf432e14faa7bb420b6338038195963f6b73d2 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:28:46 +0900 Subject: [PATCH 08/25] add missing license headers --- packages/backend/src/misc/FileWriterStream.ts | 5 +++++ packages/backend/src/misc/JsonArrayStream.ts | 5 +++++ packages/frontend/src/scripts/search-emoji.ts | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/packages/backend/src/misc/FileWriterStream.ts b/packages/backend/src/misc/FileWriterStream.ts index 828851df0e..367a8eb560 100644 --- a/packages/backend/src/misc/FileWriterStream.ts +++ b/packages/backend/src/misc/FileWriterStream.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import * as fs from 'node:fs/promises'; import type { PathLike } from 'node:fs'; diff --git a/packages/backend/src/misc/JsonArrayStream.ts b/packages/backend/src/misc/JsonArrayStream.ts index ad35bb3a79..754938989d 100644 --- a/packages/backend/src/misc/JsonArrayStream.ts +++ b/packages/backend/src/misc/JsonArrayStream.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + import { TransformStream } from 'node:stream/web'; /** diff --git a/packages/frontend/src/scripts/search-emoji.ts b/packages/frontend/src/scripts/search-emoji.ts index 07f55e5531..371f69b9a7 100644 --- a/packages/frontend/src/scripts/search-emoji.ts +++ b/packages/frontend/src/scripts/search-emoji.ts @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + export type EmojiDef = { emoji: string; name: string; From eb60460d28be24513b567d378cec6ecba5c158c7 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 1 Mar 2024 11:57:26 +0900 Subject: [PATCH 09/25] =?UTF-8?q?enhance:=20=E7=A6=81=E6=AD=A2=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E5=BC=B7?= =?UTF-8?q?=E5=8C=96=20(#27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance: 禁止ワードチェック強化 * リモートの禁止ワードチェックを添付ファイルとユーザーを登録する前に行うなど Resolve https://github.com/misskey-dev/misskey/issues/13374 * 禁止ワートの対象の見直し * performActivityで特定のエラーが出た際にDelayedに追加しないように * use IdentifiableError * NoteCreateService.checkProhibitedWords * https://github.com/misskey-dev/misskey-private/pull/27/files#r1507416135 * remove comment --- .../backend/src/core/NoteCreateService.ts | 25 +++++++- packages/backend/src/core/UtilityService.ts | 14 +++++ .../src/core/activitypub/ApInboxService.ts | 1 - .../core/activitypub/models/ApNoteService.ts | 62 ++++++++++++------- .../queue/processors/InboxProcessorService.ts | 5 +- 5 files changed, 83 insertions(+), 24 deletions(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 727787f868..81ae2908d3 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -263,7 +263,13 @@ export class NoteCreateService implements OnApplicationShutdown { } } - if (this.utilityService.isKeyWordIncluded(data.cw ?? data.text ?? '', meta.prohibitedWords)) { + const hasProhibitedWords = await this.checkProhibitedWordsContain({ + cw: data.cw, + text: data.text, + pollChoices: data.poll?.choices, + }, meta.prohibitedWords); + + if (hasProhibitedWords) { throw new IdentifiableError('689ee33f-f97c-479a-ac49-1b9f8140af99', 'Note contains prohibited words'); } @@ -995,6 +1001,23 @@ export class NoteCreateService implements OnApplicationShutdown { } } + public async checkProhibitedWordsContain(content: Parameters[0], prohibitedWords?: string[]) { + if (prohibitedWords == null) { + prohibitedWords = (await this.metaService.fetch()).prohibitedWords; + } + + if ( + this.utilityService.isKeyWordIncluded( + this.utilityService.concatNoteContentsForKeyWordCheck(content), + prohibitedWords, + ) + ) { + return true; + } + + return false; + } + @bindThis public dispose(): void { this.#shutdownController.abort(); diff --git a/packages/backend/src/core/UtilityService.ts b/packages/backend/src/core/UtilityService.ts index 638a0c019e..652e8f7449 100644 --- a/packages/backend/src/core/UtilityService.ts +++ b/packages/backend/src/core/UtilityService.ts @@ -42,6 +42,20 @@ export class UtilityService { return silencedHosts.some(x => `.${host.toLowerCase()}`.endsWith(`.${x}`)); } + @bindThis + public concatNoteContentsForKeyWordCheck(content: { + cw?: string | null; + text?: string | null; + pollChoices?: string[] | null; + others?: string[] | null; + }): string { + /** + * ノートの内容を結合してキーワードチェック用の文字列を生成する + * cwとtextは内容が繋がっているかもしれないので間に何も入れずにチェックする + */ + return `${content.cw ?? ''}${content.text ?? ''}\n${(content.pollChoices ?? []).join('\n')}\n${(content.others ?? []).join('\n')}`; + } + @bindThis public isKeyWordIncluded(text: string, keyWords: string[]): boolean { if (keyWords.length === 0) return false; diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index b0f56a5d82..1621c41bcc 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -36,7 +36,6 @@ import { ApResolverService } from './ApResolverService.js'; import { ApAudienceService } from './ApAudienceService.js'; import { ApPersonService } from './models/ApPersonService.js'; import { ApQuestionService } from './models/ApQuestionService.js'; -import { CacheService } from '@/core/CacheService.js'; import { GlobalEventService } from '@/core/GlobalEventService.js'; import type { Resolver } from './ApResolverService.js'; import type { IAccept, IAdd, IAnnounce, IBlock, ICreate, IDelete, IFlag, IFollow, ILike, IObject, IReject, IRemove, IUndo, IUpdate, IMove } from './type.js'; diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index e201b88173..b2fd435f93 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -24,6 +24,8 @@ import { StatusError } from '@/misc/status-error.js'; import { UtilityService } from '@/core/UtilityService.js'; import { bindThis } from '@/decorators.js'; import { checkHttps } from '@/misc/check-https.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; +import { isNotNull } from '@/misc/is-not-null.js'; import { getOneApId, getApId, getOneApHrefNullable, validPost, isEmoji, getApType } from '../type.js'; import { ApLoggerService } from '../ApLoggerService.js'; import { ApMfmService } from '../ApMfmService.js'; @@ -37,7 +39,6 @@ import { ApQuestionService } from './ApQuestionService.js'; import { ApImageService } from './ApImageService.js'; import type { Resolver } from '../ApResolverService.js'; import type { IObject, IPost } from '../type.js'; -import { isNotNull } from '@/misc/is-not-null.js'; @Injectable() export class ApNoteService { @@ -152,11 +153,47 @@ export class ApNoteService { throw new Error('invalid note.attributedTo: ' + note.attributedTo); } - const actor = await this.apPersonService.resolvePerson(getOneApId(note.attributedTo), resolver) as MiRemoteUser; + const uri = getOneApId(note.attributedTo); - // 投稿者が凍結されていたらスキップ + // ローカルで投稿者を検索し、もし凍結されていたらスキップ + const cachedActor = await this.apPersonService.fetchPerson(uri) as MiRemoteUser; + if (cachedActor && cachedActor.isSuspended) { + throw new IdentifiableError('85ab9bd7-3a41-4530-959d-f07073900109', 'actor has been suspended'); + } + + const apMentions = await this.apMentionService.extractApMentions(note.tag, resolver); + const apHashtags = extractApHashtags(note.tag); + + const cw = note.summary === '' ? null : note.summary; + + // テキストのパース + let text: string | null = null; + if (note.source?.mediaType === 'text/x.misskeymarkdown' && typeof note.source.content === 'string') { + text = note.source.content; + } else if (typeof note._misskey_content !== 'undefined') { + text = note._misskey_content; + } else if (typeof note.content === 'string') { + text = this.apMfmService.htmlToMfm(note.content, note.tag); + } + + const poll = await this.apQuestionService.extractPollFromQuestion(note, resolver).catch(() => undefined); + + //#region Contents Check + // 添付ファイルとユーザーをこのサーバーで登録する前に内容をチェックする + /** + * 禁止ワードチェック + */ + const hasProhibitedWords = await this.noteCreateService.checkProhibitedWordsContain({ cw, text, pollChoices: poll?.choices }); + if (hasProhibitedWords) { + throw new IdentifiableError('689ee33f-f97c-479a-ac49-1b9f8140af99', 'Note contains prohibited words'); + } + //#endregion + + const actor = cachedActor ?? await this.apPersonService.resolvePerson(uri, resolver) as MiRemoteUser; + + // 解決した投稿者が凍結されていたらスキップ if (actor.isSuspended) { - throw new Error('actor has been suspended'); + throw new IdentifiableError('85ab9bd7-3a41-4530-959d-f07073900109', 'actor has been suspended'); } const noteAudience = await this.apAudienceService.parseAudience(actor, note.to, note.cc, resolver); @@ -171,9 +208,6 @@ export class ApNoteService { } } - const apMentions = await this.apMentionService.extractApMentions(note.tag, resolver); - const apHashtags = extractApHashtags(note.tag); - // 添付ファイル // TODO: attachmentは必ずしもImageではない // TODO: attachmentは必ずしも配列ではない @@ -233,18 +267,6 @@ export class ApNoteService { } } - const cw = note.summary === '' ? null : note.summary; - - // テキストのパース - let text: string | null = null; - if (note.source?.mediaType === 'text/x.misskeymarkdown' && typeof note.source.content === 'string') { - text = note.source.content; - } else if (typeof note._misskey_content !== 'undefined') { - text = note._misskey_content; - } else if (typeof note.content === 'string') { - text = this.apMfmService.htmlToMfm(note.content, note.tag); - } - // vote if (reply && reply.hasPoll) { const poll = await this.pollsRepository.findOneByOrFail({ noteId: reply.id }); @@ -274,8 +296,6 @@ export class ApNoteService { const apEmojis = emojis.map(emoji => emoji.name); - const poll = await this.apQuestionService.extractPollFromQuestion(note, resolver).catch(() => undefined); - try { return await this.noteCreateService.create(actor, { createdAt: note.published ? new Date(note.published) : null, diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts index 0a713149e5..3addead058 100644 --- a/packages/backend/src/queue/processors/InboxProcessorService.ts +++ b/packages/backend/src/queue/processors/InboxProcessorService.ts @@ -185,7 +185,10 @@ export class InboxProcessorService { await this.apInboxService.performActivity(authUser.user, activity); } catch (e) { if (e instanceof IdentifiableError) { - if (e.id === '689ee33f-f97c-479a-ac49-1b9f8140af99') return 'blocked notes with prohibited words'; + if (e.id === '689ee33f-f97c-479a-ac49-1b9f8140af99') { + return 'blocked notes with prohibited words'; + } + if (e.id === '85ab9bd7-3a41-4530-959d-f07073900109') return 'actor has been suspended'; } throw e; } From ba9d47fb69f6254a4a07c5a1ad18585a99a3fc8e Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:22:06 +0900 Subject: [PATCH 10/25] 2024.3.0 --- CHANGELOG.md | 3 ++- package.json | 2 +- packages/misskey-js/package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 359b8acf56..15028e7008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ - --> -## 202x.x.x (unreleased) + +## 2024.3.0 ### General - Enhance: 投稿者のロールに応じて、一つのノートに含むことのできるメンションとダイレクト投稿の宛先の人数に上限を設定できるように diff --git a/package.json b/package.json index 68814f74b8..dee4645ee3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2024.2.0", + "version": "2024.3.0", "codename": "nasubi", "repository": { "type": "git", diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index 1069e85b23..a7c629119c 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "misskey-js", - "version": "2024.2.0", + "version": "2024.3.0", "description": "Misskey SDK for JavaScript", "types": "./built/dts/index.d.ts", "exports": { From fe5efd926efca8a4b14f54a5af930eb51eb4d5ec Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:00:43 +0900 Subject: [PATCH 11/25] New translations ja-jp.yml (Chinese Traditional) (#13480) --- locales/zh-TW.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index bc872823f1..5cdecc10ac 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1655,6 +1655,7 @@ _role: gtlAvailable: "瀏覽全域時間軸" ltlAvailable: "瀏覽本地時間軸" canPublicNote: "允許公開貼文" + mentionMax: "貼文內的最大提及數" canInvite: "發行伺服器邀請碼" inviteLimit: "可建立邀請碼的數量" inviteLimitCycle: "邀請碼的發放間隔" @@ -2299,6 +2300,7 @@ _notification: reactedBySomeUsers: "{n}人做出了反應" renotedBySomeUsers: "{n}人做了轉發" followedBySomeUsers: "被{n}人追隨了" + flushNotification: "重置通知歷史紀錄" _types: all: "全部 " note: "使用者的最新貼文" From f70489193270a689e37b8f31f6563471a26eaee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sat, 2 Mar 2024 05:53:43 +0900 Subject: [PATCH 12/25] fix: emoji colorization --- packages/frontend/src/scripts/emojilist.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/emojilist.ts b/packages/frontend/src/scripts/emojilist.ts index f2fbeae0ed..35a08ef331 100644 --- a/packages/frontend/src/scripts/emojilist.ts +++ b/packages/frontend/src/scripts/emojilist.ts @@ -41,7 +41,7 @@ export const emojiCharByCategory = _charGroupByCategory; export function getUnicodeEmoji(char: string): UnicodeEmojiDef | null { // Colorize it because emojilist.json assumes that - return unicodeEmojisMap.get(colorizeEmoji(char)) ?? null; + return unicodeEmojisMap.get(colorizeEmoji(char)) ?? unicodeEmojisMap.get(char) ?? null; } export function getEmojiName(char: string): string | null { From 114d3319e819aa920e21c91034c46ece9afd5d3d Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 2 Mar 2024 13:26:21 +0900 Subject: [PATCH 13/25] =?UTF-8?q?chore(client):=20=E7=B5=B5=E6=96=87?= =?UTF-8?q?=E5=AD=97=E3=81=AE=E7=94=BB=E5=83=8F=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=97=E3=81=9F=E9=9A=9B?= =?UTF-8?q?=E3=81=AF=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=81=AA=E3=81=8F=E3=83=80=E3=83=9F=E3=83=BC=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=20(#13487)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/global/MkCustomEmoji.stories.impl.ts | 7 +++++++ packages/frontend/src/components/global/MkCustomEmoji.vue | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts b/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts index e0da6a4a13..2e791e991e 100644 --- a/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts +++ b/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts @@ -48,3 +48,10 @@ export const Missing = { name: Default.args.name, }, } satisfies StoryObj; +export const Error = { + ...Default, + args: { + url: 'https://example.com/404', + name: Default.args.name, + }, +} satisfies StoryObj; diff --git a/packages/frontend/src/components/global/MkCustomEmoji.vue b/packages/frontend/src/components/global/MkCustomEmoji.vue index dbcb00460c..67927ddd22 100644 --- a/packages/frontend/src/components/global/MkCustomEmoji.vue +++ b/packages/frontend/src/components/global/MkCustomEmoji.vue @@ -4,7 +4,12 @@ SPDX-License-Identifier: AGPL-3.0-only -->