feat: deliver Like activity to relays#17362
Open
sinoru wants to merge 1 commit into
Open
Conversation
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
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
Contributor
|
この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"
}, |
Contributor
Backend memory usage comparisonBefore GC
After GC
After Request
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ReactionServicenow deliversLikeandUndo LikeActivityPub activities to relay servers when the target note's visibility ispublic, matching the existing relay-delivery pattern inNoteCreateService,NoteDeleteService,PollService,NotePiningService,AccountUpdateService, andAccountMoveService.A new admin meta option
deliverReactionsToRelays(defaulttrue) is added so operators can opt out. The toggle is exposed under/admin/relays.Closes #17307.
Why
Previously
ReactionServicedelivered Like/Undo Like only to the note author (direct) and followers.RelayServicewas 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
Like/Undo Likeonly. Other under-relayed activities (e.g.Delete Person, account suspension) are intentionally out of scope.Checklist