Mastodon uses the to and cc fields to indicate intended visibility
The presence and position of the Public collection determines visibility level
No explicit “visibility” property is included in ActivityPub messages
Convention-Based Visibility:
The difference between “public” and “unlisted” is determined by whether the Public collection is in to (public) or cc (unlisted)
This is a convention defined by Mastodon, not explicitly required by the spec
I also sent a user-targeted explanation of how Mastodon’s privacy settings work, that might be helpful for you to read. You can probably find it in my profile.
They’re really not.
Here’s the relevant docs, and a little summary of how they relate to private posts and Mastodon’s specific implementation of them.
Specs: https://www.w3.org/TR/activitypub/#delivery
Mastodon code where you can verify that this is how they are handled: https://github.com/mastodon/mastodon/blob/main/app/lib/activitypub/tag_manager.rb (look at the cc() and to() functions)
Overall summary in detail:
ActivityPub Specification
What ActivityPub Explicitly Mandates
Audience Targeting (Section 5.1):
to
,cc
, etc.)Public Posts (Section 7.1.2 and 7.1.3):
sharedInbox
endpointsFiltering (Sections 5.2 and 7.1.2):
Privacy of Non-Addressed Content (Section 7.1 Note on “Silent and private activities”):
What ActivityPub Leaves Undefined
Visibility Levels:
Privacy Enforcement:
Timeline Placement:
Mastodon’s Implementation
Visibility Levels in Mastodon
Mastodon implements four primary visibility levels:
Public
to
: [“https://www.w3.org/ns/activitystreams#Public”]cc
: [“https://example.com/users/username/followers”]Unlisted
to
: [“https://example.com/users/username/followers”]cc
: [“https://www.w3.org/ns/activitystreams#Public”]Private
to
: [“https://example.com/users/username/followers”]cc
: [] (empty)Direct
to
: [array of mentioned user URLs]cc
: [] (empty)Key Implementation Details
Visibility Through Addressing:
to
andcc
fields to indicate intended visibilityConvention-Based Visibility:
to
(public) orcc
(unlisted)I also sent a user-targeted explanation of how Mastodon’s privacy settings work, that might be helpful for you to read. You can probably find it in my profile.