Need help implementing ActivityPub - getting inconsistent results across platforms
My friend is working on adding ActivityPub support to his blog platform (BDServer) so people can follow/comment from Mastodon, Lemmy, etc.
Current status: Lemmy and Misskey can find and follow his account (@blenderdumbass@blenderdumbass.org), but Mastodon can't find it at all, even though he sees proper ActivityPub requests hitting his server.
The technical details are pretty gnarly - RSA signature verification, HTTP header recreation, multi-threading issues. He wrote up the full journey here: Please Help Me With Activity Pub
If anyone has ActivityPub experience or wants to take a look at the code (Python), we have a Matrix room for BDServer development. Any insights on why different platforms behave differently would be super helpful.
matrix.to/#/#bdserver:tchncs.d…
Source code: ActivityPub.py
Please Help Me With Activity Pub
This article is published on a website which is powered by BDServer. And I'm trying to make this website support ActivityPub, so you could for example, subscribe to me from your Mastodon account. Yet it is easier said than done.blenderdumbass . org
like this
Marthirial doesn't like this.
flamingos-cant
in reply to Madiator2011 • • •I'm not the most knowledgeable about Mastodon's APub implementation, but having a look at the
Actor
of that profile, it might be because it's invalid JSON-LD. Now, Mastodon doesn't actually do proper JSON-LD checks, you can follow PieFed profiles from Mastodon and they don't produce proper JSON-LD, but they do include"https://w3id.org/security/v1"
in their@context
, and doing a code search of Mastodon's source code does show some checks for if that's included.Lemmy's I am familiar with and irrc it doesn't even check if
@context
is present.GitHub
GitHublike this
Anonymous, Angular2575, Mechanize and Blaze (he/him) like this.
irelephant [he/him]
in reply to Madiator2011 • • •Did something change since this was posted?
I can look it up properly on mastodon.
You have to be signed in to fetch accounts on mastodon, is that the problem?
Are you using any framework to build the site? There's a few libraries for activitypub.
These links could be helpful: codeberg.org/fediverse/delight…
delightful-activitypub-development
Codeberg.orglike this
Angular2575, Mechanize, orgrinrt, Simyon and Blaze (he/him) like this.
Blender Dumbass
in reply to irelephant [he/him] • • •Seems like somebody mentioned the account on the fediverse that started a chain reaction of various instances requesting a bunch of stuff. Which made it to Mastodon.social too. It still doesn't work though.
The server is written in python and the idea is to make it deploy-able without needing to install anything extra. So I'm trying to implement my own activity pub.
like this
Otter and Simyon like this.
rglullis
in reply to Blender Dumbass • • •Django ActivityPub ToolKit
activitypub.mushroomlabs.comlike this
Angular2575 and Mechanize like this.
Blender Dumbass
in reply to rglullis • • •rglullis
in reply to Blender Dumbass • • •django-activitypub-toolkit
Codeberg.orgBlaze (he/him) likes this.
irelephant [he/him]
in reply to Madiator2011 • • •I just took another look at it,
Comparing it to another random
note
, theto
andcc
fields are supposed to be arrays, rather than just a string.Its also missing a
url
field, which is supposed to link to the user-facing url of the post.cc: @blenderdumbass@lm.madiator.cloud
like this
Blender Dumbass, Blaze (he/him) and secret300 like this.