Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActivityPub integration #11580

Draft
wants to merge 514 commits into
base: develop
Choose a base branch
from
Draft

ActivityPub integration #11580

wants to merge 514 commits into from

Conversation

julianlam
Copy link
Member

@julianlam julianlam commented May 8, 2023

This pull requests adds ActivityPub integration into NodeBB. It is not meant to be completely exhaustive, but mostly a proof-of-concept integration that will be improved over time.

For example:

  • while there is probably a way to integrate groups into the ActivityPub (Friendica has done this I believe?) protocol, that would be beyond the scope of this initial implementation.
  • visibility scope can theoretically be used to integrate ActivityPub with NodeBB chats. This is also beyond the initial scope.

High Level Items

  • /.well-known/webfinger implementation
  • Admin control switch to disable federation
  • Ability to view user profiles on remote/federated instances
  • Can follow users from another instance, and an accept is automatically sent back (as NodeBB does not have the capability to accept/reject follow requests)
  • Unfollow a user on another instance
  • User followers and followed (AP responses)
  • HTTP signature verification and signing (for inboxes and outboxes respectively)
  • User inboxes (POST only) and outboxes (GET only)
  • JIT generation of RSA keys (signing outbox items)
  • ActivityPub verbs
    • Create
    • Update
    • Delete
    • Follow
    • Accept
  • Posts are automatically sent to follower inboxes (and those mentioned)
  • Replies (ActivityPub notes) received in user inboxes are parsed and added to topics
  • Likewise, edits are propagated similarly
  • Likewise, deletions are propagated similarly
  • ... TBD...

Associated branches

In addition to the activitypub branch, the following plugins also have corresponding activitypub branches, which are necessary for proper functionality:

  1. nodebb-theme-harmony introduces world.tpl
  2. nodebb-plugin-markdown introduces logic that skips parsing if content is remote (unless it contains sourceContent in post hash)

Breaking Changes

  • [tbd] introduces a change to plugin hooks filter:user.following and filter:user.followers. The uids property used to pass in local uids (aka numbers) but can now contain remote actor uris (strings).

Useful resources

@nodebb-misty
Copy link
Contributor

💡 Friendly Note

This pull request was made against the develop branch, which is reserved for commits destined for a minor or major release.If your commits simply fixes a bug, please rebase this PR against the master instead.

  • patch releases — bug fixes only
  • minor releases — new features, enhancements, and bug fixes
  • major releases — breaking changes, including all of the above

Thanks!

@julianlam julianlam self-assigned this May 8, 2023
@julianlam
Copy link
Member Author

As per @helge@mymath.rocks, only a limited subject of ActivityPub verbs needs be implemented for basic federation functionality. I will use those now as the benchmark for completion of this PR.

@julianlam
Copy link
Member Author

It seems that GETting from an inbox and POSTing to an outbox are client-to-server actions, which I don't see a need to support for now.

I have updated the original issue to only specify POSTing to an inbox and GETting from an outbox.

@julianlam julianlam force-pushed the activitypub branch 3 times, most recently from 4d126aa to 8506716 Compare May 29, 2023 21:43
@norty23456

This comment was marked as spam.

@bil-ash
Copy link

bil-ash commented Dec 9, 2023

Seems this PR has made much progress. Any ETA about when this will be merged?

oplik0 and others added 30 commits May 6, 2024 22:52
For fully cached topics it returned bare tid instead of a { tid, count } object.

Typescript would fix this btw :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants