Skip to content

fix(backend): handle relay-delivered Announce activities correctly#17308

Open
sinoru wants to merge 2 commits intomisskey-dev:developfrom
sinoru:bugfix/11056
Open

fix(backend): handle relay-delivered Announce activities correctly#17308
sinoru wants to merge 2 commits intomisskey-dev:developfrom
sinoru:bugfix/11056

Conversation

@sinoru
Copy link
Copy Markdown
Contributor

@sinoru sinoru commented Apr 13, 2026

What

リレーアクター経由で届いたAnnounceアクティビティを通常のRenoteと区別し、内包された元ノートをノートストリームに直接公開するように変更しました。

Changed the handling of Announce activities from relay actors so that the inner note is published directly to the notes stream, instead of being treated as a regular Renote.

Why

リレー経由で配信されたノートはリレーアクターのAnnounceで包まれているため、既存のロジックではRenoteとして表示されてしまう問題がありました。

Notes delivered through relays are wrapped in an Announce activity by the relay actor, causing them to appear as Renotes of the original instead of standalone notes.

Fix #11056

Additional info (optional)

リレーアクターの判定は、アクターのinboxまたはsharedInboxを承認済みリレーのエントリと照合して行います。

Relay actor detection works by matching the actor's inbox or sharedInbox against accepted relay entries.

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:M This PR changes 30-99 lines, ignoring generated files. label Apr 13, 2026
@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 13.79310% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.64%. Comparing base (c9c6ef2) to head (ef6936c).

Files with missing lines Patch % Lines
packages/backend/src/core/RelayService.ts 23.52% 13 Missing ⚠️
...ges/backend/src/core/activitypub/ApInboxService.ts 0.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17308      +/-   ##
===========================================
- Coverage    63.67%   63.64%   -0.04%     
===========================================
  Files         1162     1162              
  Lines       116490   116514      +24     
  Branches      8470     8454      -16     
===========================================
- Hits         74175    74154      -21     
- Misses       40110    40155      +45     
  Partials      2205     2205              

☔ 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 Apr 13, 2026

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 330.13 MB 320.98 MB -9.15 MB -2.77%
VmHWM 330.13 MB 320.98 MB -9.15 MB -2.77%
VmSize 23124.85 MB 23114.71 MB -10.13 MB -0.04%
VmData 1394.90 MB 1384.40 MB -10.50 MB -0.75%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 330.27 MB 320.99 MB -9.27 MB -2.80%
VmHWM 330.27 MB 320.99 MB -9.27 MB -2.80%
VmSize 23124.94 MB 23115.13 MB -9.80 MB -0.04%
VmData 1394.98 MB 1384.82 MB -10.16 MB -0.72%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 330.51 MB 321.42 MB -9.08 MB -2.75%
VmHWM 330.51 MB 321.42 MB -9.08 MB -2.75%
VmSize 23124.94 MB 23115.21 MB -9.72 MB -0.04%
VmData 1394.90 MB 1384.90 MB -10.00 MB -0.71%

See workflow logs for details

Relay Announce activities now use the target note URI instead of the
Announce URI for federation allowlist checks, dedup locking, and
existence lookups. Notes delivered via relay are published directly to
the notes stream without creating a renote.

Closes misskey-dev#11056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/backend Server side specific issue/PR size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

Publish notes announced by relay

1 participant