Skip to content

feat: deliver Like activity to relays#17362

Open
sinoru wants to merge 1 commit into
misskey-dev:developfrom
sinoru:feature/17307
Open

feat: deliver Like activity to relays#17362
sinoru wants to merge 1 commit into
misskey-dev:developfrom
sinoru:feature/17307

Conversation

@sinoru
Copy link
Copy Markdown
Contributor

@sinoru sinoru commented May 3, 2026

What

ReactionService now delivers Like and Undo Like ActivityPub activities to relay servers when the target note's visibility is public, matching the existing relay-delivery pattern in NoteCreateService, NoteDeleteService, PollService, NotePiningService, AccountUpdateService, and AccountMoveService.

A new admin meta option deliverReactionsToRelays (default true) is added so operators can opt out. The toggle is exposed under /admin/relays.

Closes #17307.

Why

Previously ReactionService delivered Like/Undo Like only to the note author (direct) and followers. RelayService was not injected at all, so reactions were never broadcast through relays — even though the notes themselves are. As a result, instances that pull notes via a relay could never see reactions on those notes, which weakens the social experience on smaller instances that rely on relays for content discovery.

Reactions occur far more frequently than note creations, so this PR also adds an admin opt-out. Operators concerned about amplification load on relays or downstream servers can disable the new behavior without affecting the existing direct/followers delivery.

Additional info (optional)

Scope

  • Applies to Like / Undo Like only. Other under-relayed activities (e.g. Delete Person, account suspension) are intentionally out of scope.
  • ActivityPub payload is unchanged — only the recipient set is extended — so no misskey-hub doc PR is needed.

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

Like / Undo Like ActivityPub activities for public notes are now
delivered to relay servers, matching the pattern already used by
NoteCreateService, NoteDeleteService, PollService, and others for
public-content activities.

Introduces an admin meta option `deliverReactionsToRelays` (default
true) so operators can opt out, since reactions occur far more
frequently than notes and may significantly amplify load on relays
and downstream servers.

Closes misskey-dev#17307
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 3, 2026
@github-actions github-actions Bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels May 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.01%. Comparing base (6229ac3) to head (8228434).
⚠️ Report is 13 commits behind head on develop.

Files with missing lines Patch % Lines
packages/backend/src/core/ReactionService.ts 20.00% 2 Missing and 2 partials ⚠️
...kend/src/server/api/endpoints/admin/update-meta.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17362      +/-   ##
===========================================
+ Coverage    24.70%   25.01%   +0.31%     
===========================================
  Files         1151     1155       +4     
  Lines        39093    39348     +255     
  Branches     10887    10932      +45     
===========================================
+ Hits          9659     9844     +185     
- Misses       23584    23647      +63     
- Partials      5850     5857       +7     

☔ 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 May 3, 2026

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

差分はこちら
--- base
+++ head
@@ -9920,6 +9920,9 @@
                     "enableReactionsBuffering": {
                       "type": "boolean"
                     },
+                    "deliverReactionsToRelays": {
+                      "type": "boolean"
+                    },
                     "notesPerOneAd": {
                       "type": "number"
                     },
@@ -10221,6 +10224,7 @@
                     "perUserHomeTimelineCacheMax",
                     "perUserListTimelineCacheMax",
                     "enableReactionsBuffering",
+                    "deliverReactionsToRelays",
                     "notesPerOneAd",
                     "backgroundImageUrl",
                     "deeplAuthKey",
@@ -19364,6 +19368,9 @@
                   "enableReactionsBuffering": {
                     "type": "boolean"
                   },
+                  "deliverReactionsToRelays": {
+                    "type": "boolean"
+                  },
                   "notesPerOneAd": {
                     "type": "integer"
                   },

Get diff files from Workflow Page

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 307.56 MB 297.56 MB -9.99 MB -3.25%
VmHWM 307.56 MB 297.56 MB -9.99 MB -3.25%
VmSize 23104.11 MB 23094.06 MB -10.05 MB -0.04%
VmData 1369.89 MB 1359.45 MB -10.43 MB -0.76%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 307.57 MB 298.00 MB -9.57 MB -3.11%
VmHWM 307.57 MB 298.00 MB -9.57 MB -3.11%
VmSize 23104.36 MB 23094.48 MB -9.88 MB -0.04%
VmData 1370.14 MB 1359.86 MB -10.27 MB -0.74%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 307.90 MB 298.38 MB -9.51 MB -3.09%
VmHWM 307.90 MB 298.38 MB -9.51 MB -3.09%
VmSize 23104.53 MB 23094.48 MB -10.05 MB -0.04%
VmData 1370.30 MB 1359.86 MB -10.43 MB -0.76%

See workflow logs for details

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 packages/frontend Client side specific issue/PR packages/misskey-js size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

Emoji Reactions (Like activity) are not delivered to Relays

1 participant