summaryrefslogtreecommitdiff
path: root/internal/ap
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ap')
-rw-r--r--internal/ap/interfaces.go14
-rw-r--r--internal/ap/properties.go42
2 files changed, 56 insertions, 0 deletions
diff --git a/internal/ap/interfaces.go b/internal/ap/interfaces.go
index faf793bd8..ec961f80b 100644
--- a/internal/ap/interfaces.go
+++ b/internal/ap/interfaces.go
@@ -227,6 +227,8 @@ type Accountable interface {
WithMovedTo
WithAlsoKnownAs
WithManuallyApprovesFollowers
+ WithHidesToPublicFromUnauthedWeb
+ WithHidesCcPublicFromUnauthedWeb
WithEndpoints
WithTag
WithPublished
@@ -711,6 +713,18 @@ type WithManuallyApprovesFollowers interface {
SetActivityStreamsManuallyApprovesFollowers(vocab.ActivityStreamsManuallyApprovesFollowersProperty)
}
+// WithHidesToPublicFromUnauthedWeb represents a Person or profile with the hidesToPublicFromUnauthedWeb property.
+type WithHidesToPublicFromUnauthedWeb interface {
+ GetGoToSocialHidesToPublicFromUnauthedWeb() vocab.GoToSocialHidesToPublicFromUnauthedWebProperty
+ SetGoToSocialHidesToPublicFromUnauthedWeb(vocab.GoToSocialHidesToPublicFromUnauthedWebProperty)
+}
+
+// WithHidesCcPublicFromUnauthedWeb represents a Person or profile with the hidesCcPublicFromUnauthedWeb property.
+type WithHidesCcPublicFromUnauthedWeb interface {
+ GetGoToSocialHidesCcPublicFromUnauthedWeb() vocab.GoToSocialHidesCcPublicFromUnauthedWebProperty
+ SetGoToSocialHidesCcPublicFromUnauthedWeb(vocab.GoToSocialHidesCcPublicFromUnauthedWebProperty)
+}
+
// WithEndpoints represents a Person or profile with the endpoints property
type WithEndpoints interface {
GetActivityStreamsEndpoints() vocab.ActivityStreamsEndpointsProperty
diff --git a/internal/ap/properties.go b/internal/ap/properties.go
index 722c3fca5..3e064bae0 100644
--- a/internal/ap/properties.go
+++ b/internal/ap/properties.go
@@ -562,6 +562,48 @@ func SetManuallyApprovesFollowers(with WithManuallyApprovesFollowers, manuallyAp
mafProp.Set(manuallyApprovesFollowers)
}
+// GetHidesToPublicFromUnauthedWeb returns the boolean contained in the hidesToPublicFromUnauthedWeb property of 'with'.
+//
+// Returns default 'false' if property unusable or not set.
+func GetHidesToPublicFromUnauthedWeb(with WithHidesToPublicFromUnauthedWeb) bool {
+ hidesProp := with.GetGoToSocialHidesToPublicFromUnauthedWeb()
+ if hidesProp == nil || !hidesProp.IsXMLSchemaBoolean() {
+ return false
+ }
+ return hidesProp.Get()
+}
+
+// SetHidesToPublicFromUnauthedWeb sets the given boolean on the hidesToPublicFromUnauthedWeb property of 'with'.
+func SetHidesToPublicFromUnauthedWeb(with WithHidesToPublicFromUnauthedWeb, hidesToPublicFromUnauthedWeb bool) {
+ hidesProp := with.GetGoToSocialHidesToPublicFromUnauthedWeb()
+ if hidesProp == nil {
+ hidesProp = streams.NewGoToSocialHidesToPublicFromUnauthedWebProperty()
+ with.SetGoToSocialHidesToPublicFromUnauthedWeb(hidesProp)
+ }
+ hidesProp.Set(hidesToPublicFromUnauthedWeb)
+}
+
+// GetHidesCcPublicFromUnauthedWeb returns the boolean contained in the hidesCcPublicFromUnauthedWeb property of 'with'.
+//
+// Returns default 'true' if property unusable or not set.
+func GetHidesCcPublicFromUnauthedWeb(with WithHidesCcPublicFromUnauthedWeb) bool {
+ hidesProp := with.GetGoToSocialHidesCcPublicFromUnauthedWeb()
+ if hidesProp == nil || !hidesProp.IsXMLSchemaBoolean() {
+ return true
+ }
+ return hidesProp.Get()
+}
+
+// SetHidesCcPublicFromUnauthedWeb sets the given boolean on the hidesCcPublicFromUnauthedWeb property of 'with'.
+func SetHidesCcPublicFromUnauthedWeb(with WithHidesCcPublicFromUnauthedWeb, hidesCcPublicFromUnauthedWeb bool) {
+ hidesProp := with.GetGoToSocialHidesCcPublicFromUnauthedWeb()
+ if hidesProp == nil {
+ hidesProp = streams.NewGoToSocialHidesCcPublicFromUnauthedWebProperty()
+ with.SetGoToSocialHidesCcPublicFromUnauthedWeb(hidesProp)
+ }
+ hidesProp.Set(hidesCcPublicFromUnauthedWeb)
+}
+
// GetApprovedBy returns the URL contained in
// the ApprovedBy property of 'with', if set.
func GetApprovedBy(with WithApprovedBy) *url.URL {