Actor

an actor is just something that has inbox and outbox. it represents an entity that can perform activities.

implementations

mastodon

mastodon only understands Person / Group / Organization / Application / Service due to being overly strict – mastodon/mastodon#22322

pleroma

ostensibly pleroma is also limited in the same way? https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/constants.ex#L57

other references in code:

misskey

the isActor check only validates if one of the five types

the interface requires inbox, outbox so that’s fine, it should just drop the type hardcoded check

https://github.com/misskey-dev/misskey/blob/22ccb0fa716a84560c8599781647baaaeb8e80bd/packages/backend/src/core/activitypub/type.ts#L150-L176

 1export const validActor = ['Person', 'Service', 'Group', 'Organization', 'Application'];
 2
 3
 4export const isActor = (object: IObject): object is IActor =>
 5	validActor.includes(getApType(object));
 6
 7
 8export interface IActor extends IObject {
 9	type: 'Person' | 'Service' | 'Organization' | 'Group' | 'Application';
10	name?: string;
11	preferredUsername?: string;
12	manuallyApprovesFollowers?: boolean;
13	discoverable?: boolean;
14	inbox: string;
15	sharedInbox?: string;	// 後方互換性のため
16	publicKey?: {
17		id: string;
18		publicKeyPem: string;
19	};
20	followers?: string | ICollection | IOrderedCollection;
21	following?: string | ICollection | IOrderedCollection;
22	featured?: string | IOrderedCollection;
23	outbox: string | IOrderedCollection;
24	endpoints?: {
25		sharedInbox?: string;
26	};
27	'vcard:bday'?: string;
28	'vcard:Address'?: string;
29}

gotosocial

https://github.com/superseriousbusiness/gotosocial/blob/d445c60a26e7f51f6d742e992d15cb5fabe2100c/internal/federation/dereferencing/account.go#L412-L478

seems to have a switch-case for Application Group Organization Person Service, but the comment above dereferenceAccountable() says this only (currently?) works for Person Application Service

peertube

https://github.com/Chocobozzz/PeerTube/blob/develop/shared/models/activitypub/activitypub-actor.ts

seems to have required fields type id following followers inbox outbox preferredUsername url name endpoints.sharedInbox summary attributedTo publicKey publicKey.id publicKey.owner publicKey.publicKeyPem [whew that’s a lot!]

other code spots:

https://github.com/Chocobozzz/PeerTube/blob/5070a9956052ed494077bb5e308eedd13e964799/server/helpers/custom-validators/activitypub/actor.ts

sanitizeAndCheckActorObject() does the following:

  • actor exists
  • id is valid AP url
  • inbox is valid AP url
  • preferredUsername is valid
  • url is valid AP url
  • publicKey is valid public key object
  • endpoints is valid endpoints object
  • either no outbox, or outbox is valid AP url
  • either no following, or following is valid AP url
  • either no followers, or followers is valid AP url
  • set valid attributedTo
  • set valid description [summary???]
  • either type is not Group, or [if type is Group] then attributedTo has at least 1 item