Statuses in the Mastodon API have a visibility field; Notes in ActivityPub have To/Cc/Bto/Bcc/Audience fields which provide much the same functionality. I have been trying to figure out how they map to each other:
Mastodon visibility
To
Cc
public
contains public
n/a
unlisted
n/a
contains public
private
contains actor’s followers
n/a
direct
contains anyone in mentions
n/a
limited
fallback?
fallback?
Read top to bottom. “Contains public” means there’s a non-empty intersection with the set [https://www.w3.org/ns/activitystreams#Public, as:Public, Public].
This should probably be moved to the Software/Mastodon category, since it’s not really a question about ActivityPub.
But in any case, Mastodon’s visibility scopes are a custom thing and this is generally how they map:
public = to: [public], cc: [followers, mentions]
unlisted = cc: [public, followers, mentions]
followers-only = to: [followers], cc: [mentions]
direct = to: [mentions]
Incoming posts are converted heuristically. There is no concept of “unlisted” visibility or scope in ActivityPub by default – all addressing uses to/cc which should immediately be mapped to inboxes by the server.