Skip to content

fix: store webfinger subject for remote users#17228

Open
kenshineto wants to merge 1 commit intomisskey-dev:developfrom
kenshineto:fix_acct
Open

fix: store webfinger subject for remote users#17228
kenshineto wants to merge 1 commit intomisskey-dev:developfrom
kenshineto:fix_acct

Conversation

@kenshineto
Copy link
Copy Markdown

What

Add acct to MiUser and the associated database table and api schemas. This holds the subject field returned from webfinger responses for remote user lookups.

Why

As described in #17227, @username@host is not always correct if host (the instance host) is not the same as the user host that the remote instance uses for users.

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

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 8, 2026
@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js packages/backend:test labels Mar 8, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 29.10448% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.57%. Comparing base (29c357a) to head (0db83d5).
⚠️ Report is 20 commits behind head on develop.

Files with missing lines Patch % Lines
...kages/backend/src/core/RemoteUserResolveService.ts 3.22% 30 Missing ⚠️
packages/frontend/src/components/MkPostForm.vue 0.00% 9 Missing and 7 partials ⚠️
...end/src/core/activitypub/models/ApPersonService.ts 36.84% 12 Missing ⚠️
packages/frontend/src/utility/get-user-menu.ts 0.00% 5 Missing and 2 partials ⚠️
packages/backend/src/core/AntennaService.ts 0.00% 6 Missing ⚠️
...ackages/frontend/src/components/MkAccountMoved.vue 0.00% 4 Missing and 2 partials ⚠️
packages/backend/src/core/UtilityService.ts 28.57% 5 Missing ⚠️
packages/backend/src/misc/acct.ts 40.00% 3 Missing ⚠️
...ages/backend/src/server/web/ClientServerService.ts 0.00% 3 Missing ⚠️
...ackages/frontend/src/components/MkFollowButton.vue 33.33% 2 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17228      +/-   ##
===========================================
- Coverage    63.59%   63.57%   -0.02%     
===========================================
  Files         1162     1163       +1     
  Lines       116125   116528     +403     
  Branches      8407     8391      -16     
===========================================
+ Hits         73845    74082     +237     
- Misses       40075    40261     +186     
+ Partials      2205     2185      -20     

☔ 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 Mar 8, 2026

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

差分はこちら
--- base
+++ head
@@ -87818,6 +87818,12 @@
                 "displayOrder"
               ]
             }
+          },
+          "acct": {
+            "type": [
+              "string",
+              "null"
+            ]
           }
         },
         "required": [
@@ -87829,7 +87835,8 @@
           "avatarBlurhash",
           "avatarDecorations",
           "emojis",
-          "onlineStatus"
+          "onlineStatus",
+          "acct"
         ]
       },
       "UserDetailedNotMeOnly": {

Get diff files from Workflow Page

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 8, 2026

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 317.68 MB 312.41 MB -5.26 MB -1.65%
VmHWM 317.68 MB 312.41 MB -5.26 MB -1.65%
VmSize 23112.85 MB 23107.85 MB -4.99 MB -0.02%
VmData 1382.68 MB 1379.31 MB -3.37 MB -0.24%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 317.69 MB 312.42 MB -5.27 MB -1.65%
VmHWM 317.69 MB 312.42 MB -5.27 MB -1.65%
VmSize 23112.93 MB 23107.85 MB -5.07 MB -0.02%
VmData 1382.76 MB 1379.31 MB -3.45 MB -0.24%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 318.09 MB 312.75 MB -5.33 MB -1.67%
VmHWM 318.09 MB 312.75 MB -5.33 MB -1.67%
VmSize 23113.01 MB 23107.85 MB -5.16 MB -0.02%
VmData 1382.85 MB 1379.31 MB -3.53 MB -0.25%

See workflow logs for details

@kenshineto kenshineto force-pushed the fix_acct branch 4 times, most recently from 8b64f60 to 95ada3e Compare March 9, 2026 14:29
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

Development

Successfully merging this pull request may close these issues.

Misskey incorrectly reports user acct's on remote servers when the federation host is different from the web host

1 participant