@julian@activitypub.space could you please take a look at these issues on NodeBB's side, too? Perhaps some are a misjudgment on my part, but I think that at least some are legit:
1. Outgoing Dislike is sent incorrectly
In src/activitypub/out.js, Out.dislike.note is missing await:
const payload = activitypub.mocks.activities.dislike(pid, uid);
mocks.activities.dislike() is async, so NodeBB sends a Promise instead of a valid Dislike activity. That means Catodon does not receive NodeBB downvotes correctly.
Suggested fix:
const payload = await activitypub.mocks.activities.dislike(pid, uid);
(this would mirror NodeBB's behaviour for outgoing Likes)
2. Primary links on federated forum posts are not displayed in NodeBB
Catodon sends forum root posts as Page objects with:
-url set to the primary link
-a link attachment with mediaType: "text/html"
NodeBB appears to preserve the URL into postData.url, but the post UI does not render it in the post body, it only shows up in the post menu as “View original post”.
Also, src/activitypub/notes.js only appends image attachments inline, so Link attachments are ignored visually.
Suggestion: NodeBB should render AP primary links for Page / forum-root posts, either from post.url or from the Link attachment.
3. Announce(Delete) handling can lose fresh deletes
Two issues with the Announce(Delete) handling:
In src/activitypub/inbox.js, the Announce(Delete) branch ignores unknown objects:
if (!exists) {
... Doing nothing.
break;
}
If Delete arrives before Create, NodeBB ignores the Delete, then later creates the post. That leaves a deleted remote post visible.
Suggestion: NodeBB should remember unknown deletes, tombstone pending IDs, or otherwise suppress/retry later Creates that arrive after a Delete.
Also, the Announce(Delete) path calls low-level posts.delete(id, uid) instead of the normal API delete path. For a topic OP, especially a single-post topic, that does not behave like NodeBB’s normal delete flow and may not delete the topic or emit the usual delete events.
Suggestion: use the API-level delete path where appropriate, similar to direct Delete handling.
4. Undo(Dislike) is not handled inbound
src/activitypub/inbox.js handles Undo(Like), but there is no Dislike case in inbox.undo, which results in remote Undo(Dislike) activities being silently ignored, so remote downvotes can become permanent from NodeBB’s perspective.
Suggestion: add an Undo(Dislike) case mirroring Undo(Like), and unvote the post accordingly.
5. NodeBB does not federate downvote removal correctly
src/activitypub/out.js has Out.undo.like but no Out.undo.dislike, and src/api/helpers.js always calls activitypub.out.undo.like(...) for any unvote, even when the removed vote was a downvote.
Suggestion:
-add Out.undo.dislike
-make the unvote path choose Undo(Like) or Undo(Dislike) based on the previous vote state
6. Minor log typo
In src/activitypub/inbox.js, inside inbox.dislike, the log message says [activitypub/inbox.like] - you probably want it to say [activitypub/inbox.dislike]
These issues (if confirmed on your side) affect downvotes, downvote removal, primary-link display, and reliable deletion of federated forum/group posts.