Skip to content

Instantly share code, notes, and snippets.

Mastodon protocol contains many departures from ActivityPub specification, mostly in the form of additional requirements.

The point is that the following is a non-zero list of differences. Compliant ActivityPub gets dropped by Mastodon all the time. I'm probably missing things here, since there are a ton of issues I haven't looked through, but this is what I could find just reading through the spec. I maintain that reading https://docs.joinmastodon.org/spec/activitypub/ is more useful than reading https://www.w3.org/TR/activitypub/ if your goal is to talk to Mastodon.

Mastodon protocol's differences from ActivityPub

  • The primary unit of content is a Note, not an Activity.
  • You MUST compact your documents against the same context as Mastodon's internal context. URIs are not expanded to become unambiguous.
  • Actors MUST have a type of Person, Group, Organization, Application, Service. (AP says that actors can have any type.)
  • Actors MUST have a preferredUsername (instead of MAY). Performing a WebFinger
@trwnh
trwnh / http-auth-scheme.md
Last active August 19, 2026 15:06
http-auth-scheme

the Signature-cid-v1-subject auth-scheme

Authorization: Signature-cid-v1-subject \
	signature=sig1 \
	cid="https://cid.example/"
Signature: sig1=::
Signature-Input: sig1=();keyid="https://key.example/"
@trwnh
trwnh / layer0.json
Created June 1, 2022 03:39
gmmk/pro/rev1/ansi:trwnh KeyboardLayout Editor
[
[
{
"a": 6
},
"Esc",
{
"x": 0.25
},
"F1",
/*sidebar (expanded)*/
.wT, .aeN {min-width: 320px !important;}
.wT { /*label list*/
background: rgba(0,0,0,0);
color: white;
}
.bsU { /*unread counter*/
background: red;
color: white;
padding: 0 0.5em;