Skip to content

enhance(ap): 凍結をリモートに配信する際、Delete PersonではなくUpdate Personとして表現するように#16268

Open
tamaina wants to merge 105 commits intomisskey-dev:developfrom
tamaina:remote-suspend
Open

enhance(ap): 凍結をリモートに配信する際、Delete PersonではなくUpdate Personとして表現するように#16268
tamaina wants to merge 105 commits intomisskey-dev:developfrom
tamaina:remote-suspend

Conversation

@tamaina
Copy link
Copy Markdown
Contributor

@tamaina tamaina commented Jul 7, 2025

Resolve #13256

What

  • Personにsuspended( https://docs.joinmastodon.org/spec/activitypub/#suspended )フラグを追加
    • ローカルユーザーを凍結/解凍した際はUpdate Actor-Personを送るようにする (いままではDelete/Undo Delete Actor-Person)
  • Userテーブルにリモートがそのユーザーを凍結しているのかを記録するisRemoteSuspendedカラムを追加
    • ローカルの凍結と基本的に同様の挙動を示すようにする。ローカルの凍結を解除してもリモートが凍結解除しない限りは凍結されているものとして扱う(Mastodonのspecに準拠)

Why

diff https://github.com/tamaina/misskey/compare/ap-susp-update..remote-suspend

Resolve #13256

ユーザーの凍結をDeleteとして表現するのはいろいろ不都合なので、isRemoteSuspendedフラグで管理する

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 7, 2025

Codecov Report

❌ Patch coverage is 74.30830% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.24%. Comparing base (76beac4) to head (5e9f2e3).
⚠️ Report is 702 commits behind head on develop.

Files with missing lines Patch % Lines
...end/src/core/activitypub/models/ApPersonService.ts 22.22% 14 Missing ⚠️
packages/backend/src/core/AccountUpdateService.ts 75.67% 9 Missing ⚠️
packages/backend/src/core/UserSuspendService.ts 93.05% 5 Missing ⚠️
...ackend/src/server/api/endpoints/users/followers.ts 0.00% 4 Missing ⚠️
packages/backend/src/core/QueueService.ts 0.00% 3 Missing ⚠️
packages/backend/src/core/UserSearchService.ts 25.00% 3 Missing ⚠️
...ages/backend/src/server/web/ClientServerService.ts 0.00% 3 Missing ⚠️
packages/frontend/src/pages/admin-user.vue 0.00% 3 Missing ⚠️
packages/backend/src/core/UserFollowingService.ts 50.00% 2 Missing ⚠️
...d/src/server/api/endpoints/federation/followers.ts 0.00% 2 Missing ⚠️
... and 12 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #16268      +/-   ##
===========================================
+ Coverage    46.03%   46.24%   +0.20%     
===========================================
  Files         1769     1778       +9     
  Lines       182039   182748     +709     
  Branches      5403     5554     +151     
===========================================
+ Hits         83800    84503     +703     
- Misses       98190    98215      +25     
+ Partials        49       30      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 7, 2025

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

差分はこちら
--- base
+++ head
@@ -16434,6 +16434,9 @@
                     "isSuspended": {
                       "type": "boolean"
                     },
+                    "isRemoteSuspended": {
+                      "type": "boolean"
+                    },
                     "isHibernated": {
                       "type": "boolean"
                     },
@@ -16505,6 +16508,7 @@
                     "isModerator",
                     "isSilenced",
                     "isSuspended",
+                    "isRemoteSuspended",
                     "isHibernated",
                     "lastActiveDate",
                     "moderationNote",

Get diff files from Workflow Page

@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Jul 7, 2025

アカウント削除ではない=follower/followingが減算されないのでテストの書き方を考える必要がある

というか、ローカルユーザーが凍結されてもFFの減算やFF関係の削除処理がされなさそうなのに(この仕様も一考の余地がありそう…)リモートのテストでの検証がそれの検出でっていうのはあまりよろしくない感じはありそう

@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Jul 7, 2025

@syuilo どう思う?(雑)

@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Jul 7, 2025

ローカルユーザーが凍結されてもFFの減算やFF関係の削除処理がされなさそう

全然違う、suspend時にunFollowAllが走ってた

@tamaina tamaina marked this pull request as ready for review July 23, 2025 18:05
@tamaina tamaina changed the title Remote suspend enhance(ap): 凍結をリモートに配信する際、Delete ActorではなくUpdate Actorとして表現するように Jul 23, 2025
@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Jul 23, 2025

READY FOR REVIEW

@tamaina tamaina changed the title enhance(ap): 凍結をリモートに配信する際、Delete ActorではなくUpdate Actorとして表現するように enhance(ap): 凍結をリモートに配信する際、Delete PersonではなくUpdate Personとして表現するように Jul 24, 2025
@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Aug 15, 2025

普通にテスト落ちてる?

@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Aug 15, 2025

と思ったけどmin.node-versionと.node-versionで挙動違うのおかしい

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 25, 2025
@tamaina
Copy link
Copy Markdown
Contributor Author

tamaina commented Aug 25, 2025

conflict resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/backend:test packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js size:L This PR changes 100-499 lines, ignoring generated files.

Projects

1 participant