gotosocial/internal/ap
tobi dcfc9b7885 [feature] Use hidesToPublicFromUnauthedWeb and hidesCcPublicFromUnauthedWeb properties for web visibility of statuses (#4315)
This pull request implements two new properties on ActivityPub actors: `hidesToPublicFromUnauthedWeb` and `hidesCcPublicFromUnauthedWeb`.

As documented, these properties allow actors to signal their preference for whether or not their posts should be hidden from unauthenticated web views (ie., web pages like the GtS frontend, web apps like the Mastodon frontend, web APIs like the Mastodon public timeline API, etc). This allows remote accounts to *opt in* to having their unlisted visibility posts shown in (for example) the replies section of the web view of a GtS thread. In future, we can also use these properties to determine whether we should show boosts of a remote actor's post on a GtS profile, and that sort of thing.

In keeping with our stance around privacy by default, GtS assumes `true` for `hidesCcPublicFromUnauthedWeb` if the property is not set on a remote actor, ie., hide unlisted/unlocked posts by default. `hidesToPublicFromUnauthedWeb` is assumed to be `false` if the property is not set on a remote actor, ie., show public posts by default.

~~WIP as I still want to work on the documentation for this a bit.~~

New props are already in the namespace document: https://gotosocial.org/ns

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4315
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-07-09 16:50:25 +02:00
..
activitystreams.go [chore] Move deps to code.superseriousbusiness.org (#4054) 2025-04-25 15:15:36 +02:00
activitystreams_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
ap_test.go [chore] Upgrade to Go 1.24 (#4187) 2025-05-22 12:26:11 +02:00
collections.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
collections_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
extract.go [feature] Support incoming avatar/header descriptions (#4275) 2025-06-19 15:10:41 +02:00
extractattachments_test.go [bugfix] Update GetURL to extract url from Link objects with href (#4249) 2025-06-09 12:32:00 +02:00
extractcontent_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
extractemojis_test.go [chore] Upgrade to Go 1.24 (#4187) 2025-05-22 12:26:11 +02:00
extractfocus_test.go [chore] Upgrade to Go 1.24 (#4187) 2025-05-22 12:26:11 +02:00
extracthashtags_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
extractmentions_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
extractpolicy_test.go [chore] Update interactionPolicy sub-policy parsing in line with documented defaults (#4229) 2025-06-10 14:29:42 +02:00
extractpubkey_test.go [chore] Upgrade to Go 1.24 (#4187) 2025-05-22 12:26:11 +02:00
extractsensitive_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
extractvisibility_test.go [chore] Rewrite all remaining Github links 2025-04-27 13:40:22 +02:00
interfaces.go [feature] Use hidesToPublicFromUnauthedWeb and hidesCcPublicFromUnauthedWeb properties for web visibility of statuses (#4315) 2025-07-09 16:50:25 +02:00
interfaces_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
normalize.go [chore] Deprecate with_approval, always (client API), approvalRequired, always (fedi API) (#4173) 2025-05-13 14:48:11 +00:00
normalize_test.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
properties.go [feature] Use hidesToPublicFromUnauthedWeb and hidesCcPublicFromUnauthedWeb properties for web visibility of statuses (#4315) 2025-07-09 16:50:25 +02:00
properties_test.go [bugfix] Update GetURL to extract url from Link objects with href (#4249) 2025-06-09 12:32:00 +02:00
resolve.go [chore] Rewrite all remaining Github links 2025-04-27 13:40:22 +02:00
resolve_test.go [chore] Upgrade to Go 1.24 (#4187) 2025-05-22 12:26:11 +02:00
serialize.go [feature] Move to code.superseriousbusiness.org 2025-04-26 15:38:43 +02:00
util.go [chore] Move deps to code.superseriousbusiness.org (#4054) 2025-04-25 15:15:36 +02:00