mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:32:24 -05:00
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> |
||
|---|---|---|
| .. | ||
| account.go | ||
| accountnote.go | ||
| accountsettings.go | ||
| accountstats.go | ||
| adminaction.go | ||
| advancedmigration.go | ||
| application.go | ||
| block.go | ||
| common.go | ||
| conversation.go | ||
| domainallow.go | ||
| domainblock.go | ||
| domainpermission.go | ||
| domainpermissiondraft.go | ||
| domainpermissionexclude.go | ||
| domainpermissionsubscription.go | ||
| emaildomainblock.go | ||
| emoji.go | ||
| emojicategory.go | ||
| filter.go | ||
| follow.go | ||
| followrequest.go | ||
| headerfilter.go | ||
| instance.go | ||
| interaction.go | ||
| interactionpolicy.go | ||
| list.go | ||
| marker.go | ||
| mediaattachment.go | ||
| mention.go | ||
| move.go | ||
| notification.go | ||
| poll.go | ||
| README.md | ||
| report.go | ||
| routersession.go | ||
| rule.go | ||
| sinbinstatus.go | ||
| status.go | ||
| statusbookmark.go | ||
| statusedit.go | ||
| statusfave.go | ||
| statusmute.go | ||
| tag.go | ||
| thread.go | ||
| threadmute.go | ||
| token.go | ||
| tombstone.go | ||
| user.go | ||
| usermute.go | ||
| vapidkeypair.go | ||
| webpushsubscription.go | ||
| workertask.go | ||
A note on when we should set data structures linked to objects in the database to use the
bun nullzero tag -- this should only be done if the member type is a pointer, or if the
this primitive type is literally invalid with an empty value (e.g. media IDs which when
empty signifies a null database value, compared to say an account note which when empty
could mean either an empty note OR null database value).
Obviously it is a little more complex than this in practice, but keep it in mind!