wiki.trwnh.com/content/tech/activitypub/actor.md
2022-12-24 14:44:52 -06:00

3.4 KiB

+++ +++

Actor

an actor is just something that has inbox and outbox

{{}}

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

22ccb0fa71/packages/backend/src/core/activitypub/type.ts (L150-L176)

export const validActor = ['Person', 'Service', 'Group', 'Organization', 'Application'];


export const isActor = (object: IObject): object is IActor =>
	validActor.includes(getApType(object));


export interface IActor extends IObject {
	type: 'Person' | 'Service' | 'Organization' | 'Group' | 'Application';
	name?: string;
	preferredUsername?: string;
	manuallyApprovesFollowers?: boolean;
	discoverable?: boolean;
	inbox: string;
	sharedInbox?: string;	// 後方互換性のため
	publicKey?: {
		id: string;
		publicKeyPem: string;
	};
	followers?: string | ICollection | IOrderedCollection;
	following?: string | ICollection | IOrderedCollection;
	featured?: string | IOrderedCollection;
	outbox: string | IOrderedCollection;
	endpoints?: {
		sharedInbox?: string;
	};
	'vcard:bday'?: string;
	'vcard:Address'?: string;
}

gotosocial

d445c60a26/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: