Description
(sub-issue of #121)
I don't know how to write the specific JSON format astool wants, but I'll do the research so whoever can write the JSON can do it more easily:
See app/lib/activitypub/adapter.rb
in Mastodon for the definition of @context
Mastodon uses.
In this context, "the software" refers to what Mastodon does and expects other software to do. as:
-prefixed types are described only for reference on what Mastodon uses them for.
The toot:
namespace is http://joinmastodon.org/ns#
. All other namespaces in this ticket are already used by go-fed.
ActivityStreams Actor extensions:
-
as:manuallyApprovesFollowers
- boolean, default false. If set to true, the software displays a lock icon on the user and shows "awaiting approval" rather than immediately showing the follow succeeding on the client side. -
as:movedTo
- Actor IRI, single or none. If set, the software fades out the user's profile and displays the account described by the IRI as the new location for the user. The "follow" button is removed from the user's profile if this field is set. -
as:alsoKnownAs
- Actor IRI(s). Basically a soft version of movedTo that includes all accounts this account claims to be the same user as. Non-directional, unlike movedTo. -
toot:featured
- Collection. A list of pinned notes. -
toot:discoverable
- boolean, default false. Determines whether a user is shown in the account directory. -
tag
- holds Emoji and Hashtag objects. -
attachments
- holds PropertyValue and IdentityProof objects. -
icon
- used for avatar. -
image
- used for header image.
ActivityStreams Object types:
as:Hashtag
-
name
- string. Starts with#
, case insensitive -
href
,type
- as usual.
toot:Emoji
-
name
- string. ASCII word characters only.:someword:
andsomeword
are treated as identical. The described emoji will replace the text version of the emoji in object content with an image. -
icon
- ActivityStreams Image. Requires at leasturl
to be set. -
updated
- as usual.
schema:PropertyValue
-
name
- as usual. -
value
- string. HTML allowed.
toot:IdentityProof
-
signatureAlgorithm
- string. provider name. -
name
- string. username on provider. -
signatureValue
- string. provider-specific format.
ActivityStreams Note (status) extensions:
-
as:sensitive
- boolean, default false. Determines whether media attachments should be hidden by default. -
ostatus:atomUri
- IRI. Generally the same asid
. -
ostatus:inReplyToAtomUri
- IRI. Generally the same asinReplyTo
. -
ostatus:conversation
- URI (Mastodon does not use resolvable URLs, instead using things liketag:lubar.me,2019-10-12:objectId=6708028:objectType=Conversation
). Copy from post being replied to as-is. -
tag
- holds Mention, Hashtag, and Emoji objects. -
summary
- holds content warning.
ActivityStreams Question (poll status) extensions:
All Note extensions, as well as:
-
as:attachment
- must be empty if present. -
toot:votersCount
- integer. The number of unique responses. (This counts people rather than votes, which is important for multiple-choice polls.) -
anyOf
ORoneOf
- poll options. Exactly one of these must be present. anyOf is used for multiple-choice polls, and oneOf is used for single-choice polls. Each option consists of a Note object with the following fields:-
name
- string. option text. -
replies
- Collection. only thetotalItems
field is present, representing the number of votes for this option.
-
ActivityStreams Document (media attachment) extensions:
-
toot:focalPoint
- 2-element array of numbers between 0 and 1 inclusive (x and y coordinates) -
toot:blurhash
- string. See https://github.com/woltapp/blurhash for a list of implementations of the format. -
name
- holds alternative text for accessibility. (media description) -
mediaType
,url
- as usual.