diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml
index 6ee4db4ab..b84a3e21b 100644
--- a/docs/api/swagger.yaml
+++ b/docs/api/swagger.yaml
@@ -2402,10 +2402,6 @@ definitions:
`reblog` - Someone reblogged / boosted a status.
type: string
x-go-name: Type
- uri:
- description: URI of the Accept or Reject. Only set if accepted_at or rejected_at is set, else omitted.
- type: string
- x-go-name: URI
title: InteractionRequest represents a pending, approved, or rejected interaction of type favourite, reply, or reblog.
type: object
x-go-name: InteractionRequest
diff --git a/go.mod b/go.mod
index 6b64ae9b8..2915d9847 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ replace github.com/go-swagger/go-swagger => codeberg.org/superseriousbusiness/go
replace modernc.org/sqlite => gitlab.com/NyaaaWhatsUpDoc/sqlite v1.38.2-concurrency-workaround
require (
- code.superseriousbusiness.org/activity v1.16.0
+ code.superseriousbusiness.org/activity v1.17.0
code.superseriousbusiness.org/exif-terminator v0.11.0
code.superseriousbusiness.org/httpsig v1.4.0
code.superseriousbusiness.org/oauth2/v4 v4.5.4-0.20250812115401-3961e46a7384
diff --git a/go.sum b/go.sum
index 727cc45fc..de3bbb155 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-code.superseriousbusiness.org/activity v1.16.0 h1:6WHpKx2ggkwRlI6lqiK4+VHUdTYRVOcba3fCo1E6wWk=
-code.superseriousbusiness.org/activity v1.16.0/go.mod h1:BTMWJIAuwDH1w+ieRP5N+T5LipbXjw35U6KZy0V/xdg=
+code.superseriousbusiness.org/activity v1.17.0 h1:01x4LyvL5fzKgtce+o3mqYbR1O+RaL6j/z7v/B6ivqo=
+code.superseriousbusiness.org/activity v1.17.0/go.mod h1:BTMWJIAuwDH1w+ieRP5N+T5LipbXjw35U6KZy0V/xdg=
code.superseriousbusiness.org/exif-terminator v0.11.0 h1:Hof0MCcsa+1fS17gf86fTTZ8AQnMY9h9kzcc+2C6mVg=
code.superseriousbusiness.org/exif-terminator v0.11.0/go.mod h1:9sutT1axa/kSdlPLlRFjCNKmyo/KNx8eX3XZvWBlAEY=
code.superseriousbusiness.org/go-jpeg-image-structure/v2 v2.3.0 h1:r9uq8StaSHYKJ8DklR9Xy+E9c40G1Z8yj5TRGi8L6+4=
diff --git a/internal/ap/activitystreams.go b/internal/ap/activitystreams.go
index 56ebc4909..9c2464410 100644
--- a/internal/ap/activitystreams.go
+++ b/internal/ap/activitystreams.go
@@ -23,15 +23,18 @@ import (
"code.superseriousbusiness.org/activity/pub"
)
-// PublicURI returns a fresh copy of the *url.URL version of the
-// magic ActivityPub URI https://www.w3.org/ns/activitystreams#Public
-func PublicURI() *url.URL {
- publicURI, err := url.Parse(pub.PublicActivityPubIRI)
+// publicIRI is a pre-parsed global public IRI instance.
+var publicIRI = func() *url.URL {
+ url, err := url.Parse(pub.PublicActivityPubIRI)
if err != nil {
panic(err)
}
- return publicURI
-}
+ return url
+}()
+
+// PublicIRI returns a fresh copy of the *url.URL version of the
+// magic ActivityPub URI https://www.w3.org/ns/activitystreams#Public
+func PublicIRI() *url.URL { var u url.URL; u = *publicIRI; return &u }
// https://www.w3.org/TR/activitystreams-vocabulary
const (
@@ -102,9 +105,12 @@ const (
/* GtS stuff */
- ObjectLikeApproval = "LikeApproval"
- ObjectReplyApproval = "ReplyApproval"
- ObjectAnnounceApproval = "AnnounceApproval"
+ ActivityLikeRequest = "LikeRequest"
+ ActivityReplyRequest = "ReplyRequest"
+ ActivityAnnounceRequest = "AnnounceRequest"
+ ObjectLikeAuthorization = "LikeAuthorization"
+ ObjectReplyAuthorization = "ReplyAuthorization"
+ ObjectAnnounceAuthorization = "AnnounceAuthorization"
/* Funkwhale stuff */
@@ -138,7 +144,10 @@ func isActivity(typeName string) bool {
ActivityAnnounce,
ActivityBlock,
ActivityFlag,
- ActivityDislike:
+ ActivityDislike,
+ ActivityLikeRequest,
+ ActivityReplyRequest,
+ ActivityAnnounceRequest:
return true
default:
return false
diff --git a/internal/ap/ap_test.go b/internal/ap/ap_test.go
index 0956fee66..9f275434d 100644
--- a/internal/ap/ap_test.go
+++ b/internal/ap/ap_test.go
@@ -110,7 +110,7 @@ func noteWithMentions1() vocab.ActivityStreamsNote {
// Anyone can like.
canLikeAlwaysProp := streams.NewGoToSocialAlwaysProperty()
- canLikeAlwaysProp.AppendIRI(ap.PublicURI())
+ canLikeAlwaysProp.AppendIRI(ap.PublicIRI())
canLike.SetGoToSocialAlways(canLikeAlwaysProp)
// Empty approvalRequired.
@@ -127,7 +127,7 @@ func noteWithMentions1() vocab.ActivityStreamsNote {
// Anyone can reply.
canReplyAlwaysProp := streams.NewGoToSocialAlwaysProperty()
- canReplyAlwaysProp.AppendIRI(ap.PublicURI())
+ canReplyAlwaysProp.AppendIRI(ap.PublicIRI())
canReply.SetGoToSocialAlways(canReplyAlwaysProp)
// Set empty approvalRequired.
@@ -150,7 +150,7 @@ func noteWithMentions1() vocab.ActivityStreamsNote {
// Public requires approval to announce.
canAnnounceApprovalRequiredProp := streams.NewGoToSocialApprovalRequiredProperty()
- canAnnounceApprovalRequiredProp.AppendIRI(ap.PublicURI())
+ canAnnounceApprovalRequiredProp.AppendIRI(ap.PublicIRI())
canAnnounce.SetGoToSocialApprovalRequired(canAnnounceApprovalRequiredProp)
// Set canAnnounce on the policy.
@@ -265,7 +265,7 @@ func addressable1() ap.Addressable {
note := streams.NewActivityStreamsNote()
toProp := streams.NewActivityStreamsToProperty()
- toProp.AppendIRI(ap.PublicURI())
+ toProp.AppendIRI(ap.PublicIRI())
note.SetActivityStreamsTo(toProp)
@@ -287,7 +287,7 @@ func addressable2() ap.Addressable {
note.SetActivityStreamsTo(toProp)
ccProp := streams.NewActivityStreamsCcProperty()
- ccProp.AppendIRI(ap.PublicURI())
+ ccProp.AppendIRI(ap.PublicIRI())
note.SetActivityStreamsCc(ccProp)
diff --git a/internal/ap/extract.go b/internal/ap/extract.go
index 7a727b005..f26b02a82 100644
--- a/internal/ap/extract.go
+++ b/internal/ap/extract.go
@@ -36,7 +36,7 @@ import (
"code.superseriousbusiness.org/gotosocial/internal/util"
)
-// ExtractObjects will extract object vocab.Types from given implementing interface.
+// ExtractObjects will extract object TypeOrIRIs from given implementing interface.
func ExtractObjects(with WithObject) []TypeOrIRI {
// Extract the attached object (if any).
objProp := with.GetActivityStreamsObject()
@@ -58,6 +58,28 @@ func ExtractObjects(with WithObject) []TypeOrIRI {
return objs
}
+// ExtractInstrument will extract instrument TypeOrIRIs from given implementing interface.
+func ExtractInstruments(with WithInstrument) []TypeOrIRI {
+ // Extract the attached instrument (if any).
+ instrProp := with.GetActivityStreamsInstrument()
+ if instrProp == nil {
+ return nil
+ }
+
+ // Check for invalid len.
+ if instrProp.Len() == 0 {
+ return nil
+ }
+
+ // Accumulate all of the instruments into a slice.
+ instrs := make([]TypeOrIRI, instrProp.Len())
+ for i := range instrProp.Len() {
+ instrs[i] = instrProp.At(i)
+ }
+
+ return instrs
+}
+
// ExtractActivityData will extract the usable data type (e.g. Note, Question, etc) and corresponding JSON, from activity.
func ExtractActivityData(activity pub.Activity, rawJSON map[string]any) ([]TypeOrIRI, []any, bool) {
switch typeName := activity.GetTypeName(); {
@@ -1222,14 +1244,14 @@ func ExtractInteractionPolicy(
statusable Statusable,
owner *gtsmodel.Account,
) *gtsmodel.InteractionPolicy {
- ipa, ok := statusable.(InteractionPolicyAware)
+ wip, ok := statusable.(WithInteractionPolicy)
if !ok {
// Not a type with interaction
// policy properties settable.
return nil
}
- policyProp := ipa.GetGoToSocialInteractionPolicy()
+ policyProp := wip.GetGoToSocialInteractionPolicy()
if policyProp == nil || policyProp.Len() != 1 {
return nil
}
diff --git a/internal/ap/interfaces.go b/internal/ap/interfaces.go
index ec961f80b..3224cecc0 100644
--- a/internal/ap/interfaces.go
+++ b/internal/ap/interfaces.go
@@ -143,13 +143,13 @@ func ToAcceptable(t vocab.Type) (Acceptable, bool) {
return acceptable, true
}
-// IsApprovable returns whether AS vocab type name
-// is something that can be cast to Approvable.
-func IsApprovable(typeName string) bool {
+// IsAuthorizationable returns whether AS vocab type name
+// is something that can be cast to Authorizationable.
+func IsAuthorizationable(typeName string) bool {
switch typeName {
- case ObjectLikeApproval,
- ObjectReplyApproval,
- ObjectAnnounceApproval:
+ case ObjectLikeAuthorization,
+ ObjectReplyAuthorization,
+ ObjectAnnounceAuthorization:
return true
default:
return false
@@ -157,12 +157,12 @@ func IsApprovable(typeName string) bool {
}
// ToAcceptable safely tries to cast vocab.Type as Approvable.
-func ToApprovable(t vocab.Type) (Approvable, bool) {
- approvable, ok := t.(Approvable)
- if !ok || !IsApprovable(t.GetTypeName()) {
+func ToAuthorizationable(t vocab.Type) (Authorizationable, bool) {
+ authable, ok := t.(Authorizationable)
+ if !ok || !IsAuthorizationable(t.GetTypeName()) {
return nil, false
}
- return approvable, true
+ return authable, true
}
// IsAttachmentable returns whether AS vocab type name
@@ -188,6 +188,36 @@ func ToAttachmentable(t vocab.Type) (Attachmentable, bool) {
return attachmentable, true
}
+// IsAnnounceable returns whether AS vocab type name
+// is something that can be cast to vocab.ActivityStreamsAnnounce.
+func IsAnnounceable(typeName string) bool {
+ return typeName == ActivityAnnounce
+}
+
+// ToAnnounceable safely tries to cast vocab.Type as vocab.ActivityStreamsAnnounce.
+func ToAnnounceable(t vocab.Type) (vocab.ActivityStreamsAnnounce, bool) {
+ announceable, ok := t.(vocab.ActivityStreamsAnnounce)
+ if !ok || t.GetTypeName() != ActivityAnnounce {
+ return nil, false
+ }
+ return announceable, true
+}
+
+// IsLikeable returns whether AS vocab type name
+// is something that can be cast to vocab.ActivityStreamsLike.
+func IsLikeable(typeName string) bool {
+ return typeName == ActivityLike
+}
+
+// ToAnnouncToLikeableeable safely tries to cast vocab.Type as vocab.ActivityStreamsLike.
+func ToLikeable(t vocab.Type) (vocab.ActivityStreamsLike, bool) {
+ likeable, ok := t.(vocab.ActivityStreamsLike)
+ if !ok || t.GetTypeName() != ActivityLike {
+ return nil, false
+ }
+ return likeable, true
+}
+
// Activityable represents the minimum activitypub interface for representing an 'activity'.
// (see: IsActivityable() for types implementing this, though you MUST make sure to check
// the typeName as this bare interface may be implementable by non-Activityable types).
@@ -258,11 +288,6 @@ type Statusable interface {
WithReplies
}
-type InteractionPolicyAware interface {
- WithInteractionPolicy
- WithApprovedBy
-}
-
// Pollable represents the minimum activitypub interface for representing a 'poll' (it's a subset of a status).
// (see: IsPollable() for types implementing this, though you MUST make sure to check
// the typeName as this bare interface may be implementable by non-Pollable types).
@@ -299,14 +324,14 @@ type Acceptable interface {
WithResult
}
-// Approvable represents the minimum activitypub interface
-// for a LikeApproval, ReplyApproval, or AnnounceApproval.
-type Approvable interface {
+// Authorizationable represents the minimum interface for a
+// LikeAuthorization, ReplyAuthorization, AnnounceAuthorization.
+type Authorizationable interface {
vocab.Type
WithAttributedTo
- WithObject
- WithTarget
+ WithInteractingObject
+ WithInteractionTarget
}
// Attachmentable represents the minimum activitypub interface for representing a 'mediaAttachment'. (see: IsAttachmentable).
@@ -392,6 +417,16 @@ type ReplyToable interface {
WithInReplyTo
}
+// InteractionRequestable represents the minimum interface for an interaction request
+// activity, eg., LikeRequest, ReplyRequest, AnnounceRequest, QuoteRequest, etc..
+type InteractionRequestable interface {
+ vocab.Type
+
+ WithActor
+ WithObject
+ WithInstrument
+}
+
// CollectionIterator represents the minimum interface for interacting with a
// wrapped Collection or OrderedCollection in order to access next / prev items.
type CollectionIterator interface {
@@ -683,6 +718,12 @@ type WithObject interface {
SetActivityStreamsObject(vocab.ActivityStreamsObjectProperty)
}
+// WithInstrument represents an activity with ActivityStreamsInstrumentProperty
+type WithInstrument interface {
+ GetActivityStreamsInstrument() vocab.ActivityStreamsInstrumentProperty
+ SetActivityStreamsInstrument(vocab.ActivityStreamsInstrumentProperty)
+}
+
// WithTarget represents an activity with ActivityStreamsTargetProperty
type WithTarget interface {
GetActivityStreamsTarget() vocab.ActivityStreamsTargetProperty
@@ -775,14 +816,44 @@ type WithPolicyRules interface {
GetGoToSocialApprovalRequired() vocab.GoToSocialApprovalRequiredProperty // Deprecated
}
-// WithApprovedBy represents a Statusable with the approvedBy property.
+// WithApprovedBy represents an object with the approvedBy property.
type WithApprovedBy interface {
GetGoToSocialApprovedBy() vocab.GoToSocialApprovedByProperty
SetGoToSocialApprovedBy(vocab.GoToSocialApprovedByProperty)
}
-// WithVotersCount represents an activity or object the result property.
+// WithLikeAuthorization represents a Likeable with the likeAuthorization property.
+type WithLikeAuthorization interface {
+ GetGoToSocialLikeAuthorization() vocab.GoToSocialLikeAuthorizationProperty
+ SetGoToSocialLikeAuthorization(vocab.GoToSocialLikeAuthorizationProperty)
+}
+
+// WithReplyAuthorization represents a statusable with the replyAuthorization property.
+type WithReplyAuthorization interface {
+ GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty
+ SetGoToSocialReplyAuthorization(vocab.GoToSocialReplyAuthorizationProperty)
+}
+
+// WithAnnounceAuthorization represents an Announceable with the announceAuthorization property.
+type WithAnnounceAuthorization interface {
+ GetGoToSocialAnnounceAuthorization() vocab.GoToSocialAnnounceAuthorizationProperty
+ SetGoToSocialAnnounceAuthorization(vocab.GoToSocialAnnounceAuthorizationProperty)
+}
+
+// WithResult represents an activity or object with the result property.
type WithResult interface {
GetActivityStreamsResult() vocab.ActivityStreamsResultProperty
SetActivityStreamsResult(vocab.ActivityStreamsResultProperty)
}
+
+// WithInteractingObject represents an activity or object with the InteractingObject property.
+type WithInteractingObject interface {
+ GetGoToSocialInteractingObject() vocab.GoToSocialInteractingObjectProperty
+ SetGoToSocialInteractingObject(vocab.GoToSocialInteractingObjectProperty)
+}
+
+// WithInteractionTarget represents an activity or object with the InteractionTarget property.
+type WithInteractionTarget interface {
+ GetGoToSocialInteractionTarget() vocab.GoToSocialInteractionTargetProperty
+ SetGoToSocialInteractionTarget(vocab.GoToSocialInteractionTargetProperty)
+}
diff --git a/internal/ap/properties.go b/internal/ap/properties.go
index 3e064bae0..51e4ab1c0 100644
--- a/internal/ap/properties.go
+++ b/internal/ap/properties.go
@@ -226,6 +226,36 @@ func AppendObjectIRIs(with WithObject, object ...*url.URL) {
}, object...)
}
+// AppendInstrumentIRIs appends the given IRIs to the Instrument property of 'with'.
+func AppendInstrumentIRIs(with WithInstrument, instrument ...*url.URL) {
+ appendIRIs(func() Property[vocab.ActivityStreamsInstrumentPropertyIterator] {
+ instrumentProp := with.GetActivityStreamsInstrument()
+ if instrumentProp == nil {
+ instrumentProp = streams.NewActivityStreamsInstrumentProperty()
+ with.SetActivityStreamsInstrument(instrumentProp)
+ }
+ return instrumentProp
+ }, instrument...)
+}
+
+// GetResultIRIs returns the IRIs contained in the `result` property of 'with'.
+func GetResultIRIs(with WithResult) []*url.URL {
+ resultProp := with.GetActivityStreamsResult()
+ return extractIRIs(resultProp)
+}
+
+// AppendResultIRIs appends the given IRIs to the Result property of 'with'.
+func AppendResultIRIs(with WithResult, result ...*url.URL) {
+ appendIRIs(func() Property[vocab.ActivityStreamsResultPropertyIterator] {
+ resultProp := with.GetActivityStreamsResult()
+ if resultProp == nil {
+ resultProp = streams.NewActivityStreamsResultProperty()
+ with.SetActivityStreamsResult(resultProp)
+ }
+ return resultProp
+ }, result...)
+}
+
// GetTargetIRIs returns the IRIs contained in the Target property of 'with'.
func GetTargetIRIs(with WithTarget) []*url.URL {
targetProp := with.GetActivityStreamsTarget()
@@ -262,6 +292,42 @@ func AppendAttributedTo(with WithAttributedTo, attribTo ...*url.URL) {
}, attribTo...)
}
+// GetInteractingObject returns IRIs contained in the interactingObject property of 'with'.
+func GetInteractingObject(with WithInteractingObject) []*url.URL {
+ intObjProp := with.GetGoToSocialInteractingObject()
+ return getIRIs(intObjProp)
+}
+
+// AppendInteractingObject appends the given IRIs to the interactingObject property of 'with'.
+func AppendInteractingObject(with WithInteractingObject, interactingObject ...*url.URL) {
+ appendIRIs(func() Property[vocab.GoToSocialInteractingObjectPropertyIterator] {
+ intObjProp := with.GetGoToSocialInteractingObject()
+ if intObjProp == nil {
+ intObjProp = streams.NewGoToSocialInteractingObjectProperty()
+ with.SetGoToSocialInteractingObject(intObjProp)
+ }
+ return intObjProp
+ }, interactingObject...)
+}
+
+// GetInteractionTarget returns IRIs contained in the interactionTarget property of 'with'.
+func GetInteractionTarget(with WithInteractionTarget) []*url.URL {
+ intTargetProp := with.GetGoToSocialInteractionTarget()
+ return getIRIs(intTargetProp)
+}
+
+// AppendInteractionTarget appends the given IRIs to the interactionTarget property of 'with'.
+func AppendInteractionTarget(with WithInteractionTarget, interactionTarget ...*url.URL) {
+ appendIRIs(func() Property[vocab.GoToSocialInteractionTargetPropertyIterator] {
+ intTargetProp := with.GetGoToSocialInteractionTarget()
+ if intTargetProp == nil {
+ intTargetProp = streams.NewGoToSocialInteractionTargetProperty()
+ with.SetGoToSocialInteractionTarget(intTargetProp)
+ }
+ return intTargetProp
+ }, interactionTarget...)
+}
+
// GetInReplyTo returns the IRIs contained in the InReplyTo property of 'with'.
func GetInReplyTo(with WithInReplyTo) []*url.URL {
replyProp := with.GetActivityStreamsInReplyTo()
@@ -607,11 +673,11 @@ func SetHidesCcPublicFromUnauthedWeb(with WithHidesCcPublicFromUnauthedWeb, hide
// GetApprovedBy returns the URL contained in
// the ApprovedBy property of 'with', if set.
func GetApprovedBy(with WithApprovedBy) *url.URL {
- mafProp := with.GetGoToSocialApprovedBy()
- if mafProp == nil || !mafProp.IsIRI() {
+ abProp := with.GetGoToSocialApprovedBy()
+ if abProp == nil || !abProp.IsIRI() {
return nil
}
- return mafProp.Get()
+ return abProp.Get()
}
// SetApprovedBy sets the given url
@@ -625,6 +691,69 @@ func SetApprovedBy(with WithApprovedBy, approvedBy *url.URL) {
abProp.Set(approvedBy)
}
+// GetLikeAuthorization returns the URL contained in
+// the likeAuthorization property of 'with', if set.
+func GetLikeAuthorization(with WithLikeAuthorization) *url.URL {
+ laProp := with.GetGoToSocialLikeAuthorization()
+ if laProp == nil || !laProp.IsIRI() {
+ return nil
+ }
+ return laProp.Get()
+}
+
+// SetLikeAuthorization sets the given url on
+// the 'likeAuthorization' property of 'with'.
+func SetLikeAuthorization(with WithLikeAuthorization, likeAuthorization *url.URL) {
+ laProp := with.GetGoToSocialLikeAuthorization()
+ if laProp == nil {
+ laProp = streams.NewGoToSocialLikeAuthorizationProperty()
+ with.SetGoToSocialLikeAuthorization(laProp)
+ }
+ laProp.Set(likeAuthorization)
+}
+
+// GetReplyAuthorization returns the URL contained in
+// the replyAuthorization property of 'with', if set.
+func GetReplyAuthorization(with WithReplyAuthorization) *url.URL {
+ raProp := with.GetGoToSocialReplyAuthorization()
+ if raProp == nil || !raProp.IsIRI() {
+ return nil
+ }
+ return raProp.Get()
+}
+
+// SetReplyAuthorization sets the given url on
+// the 'replyAuthorization' property of 'with'.
+func SetReplyAuthorization(with WithReplyAuthorization, replyAuthorization *url.URL) {
+ raProp := with.GetGoToSocialReplyAuthorization()
+ if raProp == nil {
+ raProp = streams.NewGoToSocialReplyAuthorizationProperty()
+ with.SetGoToSocialReplyAuthorization(raProp)
+ }
+ raProp.Set(replyAuthorization)
+}
+
+// GetAnnounceAuthorization returns the URL contained in
+// the announceAuthorization property of 'with', if set.
+func GetAnnounceAuthorization(with WithAnnounceAuthorization) *url.URL {
+ aaProp := with.GetGoToSocialAnnounceAuthorization()
+ if aaProp == nil || !aaProp.IsIRI() {
+ return nil
+ }
+ return aaProp.Get()
+}
+
+// SetAnnounceAuthorization sets the given url on
+// the 'announceAuthorization' property of 'with'.
+func SetAnnounceAuthorization(with WithAnnounceAuthorization, announceAuthorization *url.URL) {
+ aaProp := with.GetGoToSocialAnnounceAuthorization()
+ if aaProp == nil {
+ aaProp = streams.NewGoToSocialAnnounceAuthorizationProperty()
+ with.SetGoToSocialAnnounceAuthorization(aaProp)
+ }
+ aaProp.Set(announceAuthorization)
+}
+
// GetMediaType returns the string contained in
// the MediaType property of 'with', if set.
func GetMediaType(with WithMediaType) string {
@@ -689,6 +818,50 @@ func SetBlurhash(with WithBlurhash, mediaType string) {
bProp.Set(mediaType)
}
+// AppendSensitive appends the given sensitive
+// boolean to the `sensitive` property of 'with'.
+func AppendSensitive(with WithSensitive, sensitive bool) {
+ sProp := with.GetActivityStreamsSensitive()
+ if sProp == nil {
+ sProp = streams.NewActivityStreamsSensitiveProperty()
+ with.SetActivityStreamsSensitive(sProp)
+ }
+ sProp.AppendXMLSchemaBoolean(sensitive)
+}
+
+// AppendContent appends the given content
+// string to the `content` property of 'with'.
+func AppendContent(with WithContent, content string) {
+ cProp := with.GetActivityStreamsContent()
+ if cProp == nil {
+ cProp = streams.NewActivityStreamsContentProperty()
+ with.SetActivityStreamsContent(cProp)
+ }
+ cProp.AppendXMLSchemaString(content)
+}
+
+// AppendContentMap appends the given content
+// language map to the `content` property of 'with'.
+func AppendContentMap(with WithContent, contentMap map[string]string) {
+ cProp := with.GetActivityStreamsContent()
+ if cProp == nil {
+ cProp = streams.NewActivityStreamsContentProperty()
+ with.SetActivityStreamsContent(cProp)
+ }
+ cProp.AppendRDFLangString(contentMap)
+}
+
+// SetReplies sets the given replies collection
+// to the `replies` property of 'with'.
+func SetReplies(with WithReplies, replies vocab.ActivityStreamsCollection) {
+ rProp := with.GetActivityStreamsReplies()
+ if rProp == nil {
+ rProp = streams.NewActivityStreamsRepliesProperty()
+ with.SetActivityStreamsReplies(rProp)
+ }
+ rProp.SetActivityStreamsCollection(replies)
+}
+
// extractIRIs extracts just the AP IRIs from an iterable
// property that may contain types (with IRIs) or just IRIs.
//
diff --git a/internal/ap/serialize.go b/internal/ap/serialize.go
index c64c14d75..10af16ea4 100644
--- a/internal/ap/serialize.go
+++ b/internal/ap/serialize.go
@@ -153,8 +153,8 @@ func serializeStatusable(t vocab.Type, includeContext bool) (map[string]interfac
NormalizeOutgoingAttachmentProp(statusable, data)
NormalizeOutgoingContentProp(statusable, data)
- if ipa, ok := statusable.(InteractionPolicyAware); ok {
- NormalizeOutgoingInteractionPolicyProp(ipa, data)
+ if wip, ok := statusable.(WithInteractionPolicy); ok {
+ NormalizeOutgoingInteractionPolicyProp(wip, data)
}
return data, nil
diff --git a/internal/api/activitypub/users/authorizationget.go b/internal/api/activitypub/users/authorizationget.go
new file mode 100644
index 000000000..a7f234854
--- /dev/null
+++ b/internal/api/activitypub/users/authorizationget.go
@@ -0,0 +1,56 @@
+// GoToSocial
+// Copyright (C) GoToSocial Authors admin@gotosocial.org
+// SPDX-License-Identifier: AGPL-3.0-or-later
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see
Babe are you okay, you've hardly touched your #piss
", status.Content) + suite.Equal("@foss_satanBabe are you okay, you've hardly touched your #piss
", status.Content) suite.Equal("https://unknown-instance.com/users/brand_new_person", status.AccountURI) suite.False(*status.Local) suite.Empty(status.ContentWarning) diff --git a/internal/federation/federatingactor_test.go b/internal/federation/federatingactor_test.go index 51ead5f31..6de4aa203 100644 --- a/internal/federation/federatingactor_test.go +++ b/internal/federation/federatingactor_test.go @@ -42,18 +42,14 @@ func (suite *FederatingActorTestSuite) TestSendNoRemoteFollowers() { ctx := suite.T().Context() testAccount := suite.testAccounts["local_account_1"] testNote := testrig.NewAPNote( - testrig.URLMustParse("http://localhost:8080/users/the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), - testrig.URLMustParse("http://localhost:8080/@the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), - time.Now(), - "boobies", - "", - testrig.URLMustParse(testAccount.URI), - []*url.URL{testrig.URLMustParse(testAccount.FollowersURI)}, - nil, - false, - nil, - nil, - nil, + &testrig.NewAPNoteParams{ + ID: testrig.URLMustParse("http://localhost:8080/users/the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), + URL: testrig.URLMustParse("http://localhost:8080/@the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), + CreatedAt: time.Now(), + Content: "boobies", + AttributedTo: testrig.URLMustParse(testAccount.URI), + To: []*url.URL{testrig.URLMustParse(testAccount.FollowersURI)}, + }, ) testActivity := testrig.WrapAPNoteInCreate(testrig.URLMustParse("http://localhost:8080/whatever_some_create"), testrig.URLMustParse(testAccount.URI), time.Now(), testNote) @@ -98,18 +94,14 @@ func (suite *FederatingActorTestSuite) TestSendRemoteFollower() { suite.NoError(err) testNote := testrig.NewAPNote( - testrig.URLMustParse("http://localhost:8080/users/the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), - testrig.URLMustParse("http://localhost:8080/@the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), - testrig.TimeMustParse("2022-06-02T12:22:21+02:00"), - "boobies", - "", - testrig.URLMustParse(testAccount.URI), - []*url.URL{testrig.URLMustParse(testAccount.FollowersURI)}, - nil, - false, - nil, - nil, - nil, + &testrig.NewAPNoteParams{ + ID: testrig.URLMustParse("http://localhost:8080/users/the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), + URL: testrig.URLMustParse("http://localhost:8080/@the_mighty_zork/statuses/01G1TR6BADACCZWQMNF9X21TV5"), + CreatedAt: testrig.TimeMustParse("2022-06-02T12:22:21+02:00"), + Content: "boobies", + AttributedTo: testrig.URLMustParse(testAccount.URI), + To: []*url.URL{testrig.URLMustParse(testAccount.FollowersURI)}, + }, ) testActivity := testrig.WrapAPNoteInCreate(testrig.URLMustParse("http://localhost:8080/whatever_some_create"), testrig.URLMustParse(testAccount.URI), testrig.TimeMustParse("2022-06-02T12:22:21+02:00"), testNote) diff --git a/internal/federation/federatingdb/accept.go b/internal/federation/federatingdb/accept.go index 2e4948a0e..d7606c4fa 100644 --- a/internal/federation/federatingdb/accept.go +++ b/internal/federation/federatingdb/accept.go @@ -22,6 +22,7 @@ import ( "errors" "fmt" "net/url" + "time" "code.superseriousbusiness.org/activity/streams/vocab" "code.superseriousbusiness.org/gotosocial/internal/ap" @@ -39,7 +40,7 @@ func (f *DB) GetAccept( ctx context.Context, acceptIRI *url.URL, ) (vocab.ActivityStreamsAccept, error) { - approval, err := f.state.DB.GetInteractionRequestByURI(ctx, acceptIRI.String()) + approval, err := f.state.DB.GetInteractionRequestByResponseURI(ctx, acceptIRI.String()) if err != nil { return nil, err } @@ -63,9 +64,9 @@ func (f *DB) Accept(ctx context.Context, accept vocab.ActivityStreamsAccept) err return nil } + // Ensure an activity ID is given. acceptID := ap.GetJSONLDId(accept) if acceptID == nil { - // We need an ID. const text = "Accept had no id property" return gtserror.NewErrorBadRequest(errors.New(text), text) } @@ -109,7 +110,7 @@ func (f *DB) Accept(ctx context.Context, accept vocab.ActivityStreamsAccept) err case name == ap.ActivityLike: objIRI := ap.GetJSONLDId(asType) if objIRI == nil { - log.Debugf(ctx, "could not retrieve id of inlined Accept object %s", name) + log.Warnf(ctx, "missing id for inlined object %s: %s", name, acceptID) continue } @@ -131,7 +132,7 @@ func (f *DB) Accept(ctx context.Context, accept vocab.ActivityStreamsAccept) err case name == ap.ActivityAnnounce || ap.IsStatusable(name): objIRI := ap.GetJSONLDId(asType) if objIRI == nil { - log.Debugf(ctx, "could not retrieve id of inlined Accept object %s", name) + log.Warnf(ctx, "missing id for inlined object %s: %s", name, acceptID) continue } @@ -146,9 +147,38 @@ func (f *DB) Accept(ctx context.Context, accept vocab.ActivityStreamsAccept) err return err } + // Todo: ACCEPT POLITE INLINED LIKE REQUEST. + // + // Implement this when we start + // sending out polite LikeRequests. + + // ACCEPT POLITE INLINED REPLY REQUEST + case name == ap.ActivityReplyRequest: + replyReq, ok := asType.(vocab.GoToSocialReplyRequest) + if !ok { + const text = "malformed ReplyRequest as object of Accept" + return gtserror.NewErrorBadRequest(errors.New(text), text) + } + + if err := f.acceptPoliteReplyRequest( + ctx, + acceptID, + accept, + replyReq, + receivingAcct, + requestingAcct, + ); err != nil { + return err + } + + // Todo: ACCEPT POLITE INLINED ANNOUNCE REQUEST + // + // Implement this when we start + // sending out polite AnnounceRequests. + // UNHANDLED default: - log.Debugf(ctx, "unhandled object type: %s", name) + log.Debugf(ctx, "unhandled object type %s: %s", name, acceptID) } } else if object.IsIRI() { @@ -445,8 +475,7 @@ func (f *DB) acceptStoredStatus( // Mark the status as approved by this URI. status.PendingApproval = util.Ptr(false) status.ApprovedByURI = approvedByURI.String() - if err := f.state.DB.UpdateStatus( - ctx, + if err := f.state.DB.UpdateStatus(ctx, status, "pending_approval", "approved_by_uri", @@ -543,8 +572,7 @@ func (f *DB) acceptLikeIRI( // Mark the fave as approved by this URI. fave.PendingApproval = util.Ptr(false) fave.ApprovedByURI = approvedByURI.String() - if err := f.state.DB.UpdateStatusFave( - ctx, + if err := f.state.DB.UpdateStatusFave(ctx, fave, "pending_approval", "approved_by_uri", @@ -566,6 +594,316 @@ func (f *DB) acceptLikeIRI( return nil } +// partialAcceptInteractionRequest represents a +// partially-parsed accept of an interaction request +// returned from parseAcceptInteractionRequestable. +type partialAcceptInteractionRequest struct { + intReqURI *url.URL + actorURI *url.URL + parentURI *url.URL + instrumentURI *url.URL + authURI *url.URL + intReq *gtsmodel.InteractionRequest // May be nil. +} + +// parseAcceptInteractionRequestable does some initial parsing +// and validation of the given Accept with inlined polite +// interaction request (LikeRequest, ReplyRequest, AnnounceRequest). +// +// Will return nil, nil if there's no need for further processing. +func (f *DB) parseAcceptInteractionRequestable( + ctx context.Context, + accept vocab.ActivityStreamsAccept, + intRequestable ap.InteractionRequestable, + receivingAcct *gtsmodel.Account, + requestingAcct *gtsmodel.Account, +) (*partialAcceptInteractionRequest, error) { + intReqURI := ap.GetJSONLDId(intRequestable) + if intReqURI == nil { + const text = "no id set on embedded interaction request" + return nil, gtserror.NewErrorBadRequest(errors.New(text), text) + } + + // Ensure we have actor IRI on + // the interaction requestable. + actors := ap.GetActorIRIs(intRequestable) + if len(actors) != 1 { + const text = "invalid or missing actor property on embedded interaction request" + return nil, gtserror.NewErrorBadRequest(errors.New(text), text) + } + actorURI := actors[0] + + // Ensure we have an object URI, which + // should point to the statusable being + // interacted with, ie., the parent status. + objects := ap.GetObjectIRIs(intRequestable) + if len(objects) != 1 { + const text = "invalid or missing object property on embedded interaction request" + return nil, gtserror.NewErrorBadRequest(errors.New(text), text) + } + parentURI := objects[0] + + // Ensure we have instrument, which should + // be or point to the activity/object that + // interacts with the parent status. + instruments := ap.ExtractInstruments(intRequestable) + if len(instruments) != 1 { + const text = "invalid or missing instrument property on embedded interaction request" + return nil, gtserror.NewErrorBadRequest(errors.New(text), text) + } + instrument := instruments[0] + + // We just need the URI for the instrument, + // not the whole type, which we can either + // fetch from remote or get locally. + var instrumentURI *url.URL + if instrument.IsIRI() { + instrumentURI = instrument.GetIRI() + } else { + t := instrument.GetType() + if t == nil { + const text = "nil instrument type on embedded interaction request" + return nil, gtserror.NewErrorBadRequest(errors.New(text), text) + } + instrumentURI = ap.GetJSONLDId(t) + } + + // Ensure we have result URI, which should + // point to an authorization for this interaction. + results := ap.GetResultIRIs(accept) + if len(results) != 1 { + const text = "invalid or missing result property on embedded interaction request" + return nil, gtserror.NewErrorBadRequest(errors.New(text), text) + } + authURI := results[0] + + // Check if we have a gtsmodel interaction + // request already stored for this interaction. + intReq, err := f.state.DB.GetInteractionRequestByInteractionURI(ctx, instrumentURI.String()) + if err != nil && !errors.Is(err, db.ErrNoEntries) { + // Real db error. + return nil, gtserror.Newf("db error getting interaction request: %w", err) + } + + if intReq == nil { + + // No request stored for this interaction. + // Means this is *probably* a remote interaction + // with a remote status. Double check this. + host := config.GetHost() + acctDomain := config.GetAccountDomain() + if instrumentURI.Host == host || + instrumentURI.Host == acctDomain || + intReqURI.Host == host || + intReqURI.Host == acctDomain { + // Claims to be Accepting something of ours, + // but we don't have an interaction request + // stored. Most likely it's been deleted in + // the meantime, or this is a mistake. Bail. + return nil, nil + } + + // This must be an Accept of a remote interaction + // request. Ensure relevance of this message by + // checking that receiver follows requester. + following, err := f.state.DB.IsFollowing( + ctx, + receivingAcct.ID, + requestingAcct.ID, + ) + if err != nil { + err := gtserror.Newf("db error checking following: %w", err) + return nil, gtserror.NewErrorInternalError(err) + } + + if !following { + // If we don't follow this person, and + // they're not Accepting something we + // created, then we don't care. + return nil, nil + } + + } else { + + // Request stored for this interaction URI. + // + // Note: this path is not actually possible until v0.21.0, + // because we don't send out polite requests yet in v0.20.0. + + // If the request is already accepted, + // we don't need to do anything at all. + if intReq.IsAccepted() { + return nil, nil + } + + // The person doing the Accept must be the + // same as the target of the interaction request. + if intReq.TargetAccountID != requestingAcct.ID { + const text = "cannot Accept interaction request on another actor's behalf" + return nil, gtserror.NewErrorForbidden(errors.New(text), text) + } + + // The stored interaction request and the inlined + // interaction request must have the same target status. + if intReq.TargetStatus.URI != parentURI.String() { + const text = "Accept interaction request mismatched object URI" + return nil, gtserror.NewErrorForbidden(errors.New(text), text) + } + + // The stored interaction request and the inlined + // interaction request must have the same URI. + if intReq.InteractionRequestURI != intReqURI.String() { + const text = "Accept interaction request mismatched id" + return nil, gtserror.NewErrorForbidden(errors.New(text), text) + } + } + + // Return the things. + return &partialAcceptInteractionRequest{ + intReqURI: intReqURI, + actorURI: actorURI, + parentURI: parentURI, + instrumentURI: instrumentURI, + authURI: authURI, + intReq: intReq, // May be nil. + }, nil +} + +// acceptPoliteReplyRequest handles the Accept of a polite ReplyRequest, +// ie., something that looks like this: +// +// { +// "@context": [ +// "https://www.w3.org/ns/activitystreams", +// "https://gotosocial.org/ns" +// ], +// "type": "Accept", +// "to": "https://example.com/users/bob", +// "id": "https://example.com/users/alice/activities/1234", +// "actor": "https://example.com/users/alice", +// "object": { +// "type": "ReplyRequest", +// "id": "https://example.com/users/bob/interaction_requests/12345", +// "actor": "https://example.com/users/bob", +// "object": "https://example.com/users/alice/statuses/1", +// "instrument": "https://example.org/users/bob/statuses/12345" +// }, +// "result": "https://example.com/users/alice/authorizations/1" +// } +func (f *DB) acceptPoliteReplyRequest( + ctx context.Context, + acceptID *url.URL, + accept vocab.ActivityStreamsAccept, + replyRequest vocab.GoToSocialReplyRequest, + receivingAcct *gtsmodel.Account, + requestingAcct *gtsmodel.Account, +) error { + // Parse out the Accept and + // embedded interaction requestable. + partial, err := f.parseAcceptInteractionRequestable( + ctx, + accept, + replyRequest, + receivingAcct, + requestingAcct, + ) + if err != nil { + return err + } + + if partial == nil { + // Nothing to do! + return nil + } + + if partial.intReq == nil { + // This is a remote accept of a remote reply. + // + // Process dereferencing etc asynchronously, leaving + // the interaction request as nil. We don't need to + // create an int req for remote accepts of remote + // replies, we can just validate + store the auth URI. + f.state.Workers.Federator.Queue.Push(&messages.FromFediAPI{ + APObjectType: ap.ActivityReplyRequest, + APActivityType: ap.ActivityAccept, + APIRI: partial.authURI, + APObject: partial.instrumentURI, + Receiving: receivingAcct, + Requesting: requestingAcct, + }) + + return nil + } + + // We already have a request stored for this interaction. + // + // Note: this path is not actually possible until v0.21.0, + // because we don't send out polite requests yet in v0.20.0. + + // Make sure the stored interaction request + // lines up with the Accept ReplyRequest. + if partial.intReq.InteractionType != gtsmodel.InteractionReply { + const text = "Accept ReplyRequest targets interaction request that isn't of type Reply" + return gtserror.NewErrorBadRequest(errors.New(text), text) + } + + // The stored reply must be the same as + // the instrument of the ReplyRequest. + reply := partial.intReq.Reply + if reply.URI != partial.instrumentURI.String() { + const text = "Accept ReplyRequest mismatched instrument URI" + return gtserror.NewErrorForbidden(errors.New(text), text) + } + + // The actor of the stored reply must be the + // same as the actor of the ReplyRequest. + if reply.AccountURI != partial.actorURI.String() { + const text = "Accept ReplyRequest mismatched actor URI" + return gtserror.NewErrorForbidden(errors.New(text), text) + } + + // This all looks good, we can update the + // interaction request and stored reply. + unlock := f.state.FedLocks.Lock(partial.intReq.InteractionURI) + defer unlock() + + authURIStr := partial.authURI.String() + partial.intReq.AcceptedAt = time.Now() + partial.intReq.AuthorizationURI = authURIStr + partial.intReq.ResponseURI = acceptID.String() + if err := f.state.DB.UpdateInteractionRequest( + ctx, partial.intReq, + "accepted_at", + "authorization_uri", + "response_uri", + ); err != nil { + return gtserror.Newf("db error updating interaction request: %w", err) + } + + reply.ApprovedByURI = authURIStr + reply.PendingApproval = util.Ptr(false) + if err := f.state.DB.UpdateStatus( + ctx, reply, + "approved_by_uri", + "pending_approval", + ); err != nil { + return gtserror.Newf("db error updating status: %w", err) + } + + // Handle any remaining side effects in the processor. + f.state.Workers.Federator.Queue.Push(&messages.FromFediAPI{ + APObjectType: ap.ActivityReplyRequest, + APActivityType: ap.ActivityAccept, + APIRI: partial.authURI, + APObject: partial.instrumentURI, + GTSModel: partial.intReq, + Receiving: receivingAcct, + Requesting: requestingAcct, + }) + + return nil +} + // approvedByURI extracts the appropriate *url.URL // to use as an interaction's approvedBy value by // checking to see if the Accept has a result URL set. @@ -577,11 +915,8 @@ func (f *DB) acceptLikeIRI( // Error is only returned if the result URI is set // but the host differs from the Accept ID host. // -// TODO: This function should be updated at some point -// to check for inlined result type, and see if type is -// a LikeApproval, ReplyApproval, or AnnounceApproval, -// and check the attributedTo, object, and target of -// the approval as well. But this'll do for now. +// TODO: This function could be updated at some +// point to check for inlined result type. func approvedByURI( acceptID *url.URL, accept vocab.ActivityStreamsAccept, @@ -623,11 +958,7 @@ func approvedByURI( if resultIRI.Host != acceptID.Host { // What the boobs is this? - err := fmt.Errorf( - "host of result %s differed from host of Accept %s", - resultIRI, accept, - ) - return nil, err + return nil, fmt.Errorf("host of result %s differed from host of Accept %s", resultIRI, accept) } // Use the result IRI we've been diff --git a/internal/federation/federatingdb/accept_test.go b/internal/federation/federatingdb/accept_test.go new file mode 100644 index 000000000..2651c6a5f --- /dev/null +++ b/internal/federation/federatingdb/accept_test.go @@ -0,0 +1,120 @@ +// GoToSocial +// Copyright (C) GoToSocial Authors admin@gotosocial.org +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, seehi @admin here's some media for ya, @the_mighty_zork you might like this too
`, - "some unknown media included
", - URLMustParse("http://example.org/users/Some_User"), - []*url.URL{ - ap.PublicURI(), - }, - []*url.URL{ - URLMustParse("http://example.org/users/Some_User/followers"), - URLMustParse("http://localhost:8080/users/admin"), - URLMustParse("http://localhost:8080/users/the_mighty_zork"), - }, - true, - []vocab.ActivityStreamsMention{ - newAPMention( + &NewAPNoteParams{ + ID: URLMustParse("http://example.org/users/Some_User/statuses/01HE7XJ1CG84TBKH5V9XKBVGF5"), + URL: URLMustParse("http://example.org/@Some_User/statuses/01HE7XJ1CG84TBKH5V9XKBVGF5"), + CreatedAt: TimeMustParse("2023-11-02T12:44:25+02:00"), + Content: `hi @admin here's some media for ya, @the_mighty_zork you might like this too
`, + Summary: "some unknown media included
", + AttributedTo: URLMustParse("http://example.org/users/Some_User"), + To: []*url.URL{ + ap.PublicIRI(), + }, + CC: []*url.URL{ + URLMustParse("http://example.org/users/Some_User/followers"), URLMustParse("http://localhost:8080/users/admin"), - "@admin@localhost:8080", - ), - newAPMention( URLMustParse("http://localhost:8080/users/the_mighty_zork"), - "@the_mighty_zork@localhost:8080", - ), + }, + Sensitive: true, + Mentions: []vocab.ActivityStreamsMention{ + newAPMention( + URLMustParse("http://localhost:8080/users/admin"), + "@admin@localhost:8080", + ), + newAPMention( + URLMustParse("http://localhost:8080/users/the_mighty_zork"), + "@the_mighty_zork@localhost:8080", + ), + }, }, - nil, - nil, ) update := WrapAPNoteInUpdate( URLMustParse("http://example.org/users/Some_User/statuses/01HE7XJ1CG84TBKH5V9XKBVGF5/update1"), @@ -3849,126 +3843,114 @@ func NewTestFediAttachments(relativePath string) map[string]RemoteAttachmentFile func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote { return map[string]vocab.ActivityStreamsNote{ "http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1": NewAPNote( - URLMustParse("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1"), - URLMustParse("http://example.org/@Some_User/afaba698-5740-4e32-a702-af61aa543bc1"), - TimeMustParse("2022-07-13T12:13:12+02:00"), - "this is a public status, please forward it!", - "", - URLMustParse("http://example.org/users/Some_User"), - []*url.URL{ap.PublicURI()}, - nil, - false, - []vocab.ActivityStreamsMention{}, - []vocab.TootHashtag{}, - []vocab.ActivityStreamsImage{ - newAPImage( - URLMustParse("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1/attachment1.jpg"), - "image/jpeg", - "trent reznor looking handsome as balls", - "LEDara58O=t5EMSOENEN9]}?aK%0"), + &NewAPNoteParams{ + ID: URLMustParse("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1"), + URL: URLMustParse("http://example.org/@Some_User/afaba698-5740-4e32-a702-af61aa543bc1"), + CreatedAt: TimeMustParse("2022-07-13T12:13:12+02:00"), + Content: "this is a public status, please forward it!", + AttributedTo: URLMustParse("http://example.org/users/Some_User"), + To: []*url.URL{ap.PublicIRI()}, + Attachments: []vocab.ActivityStreamsImage{ + newAPImage( + URLMustParse("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1/attachment1.jpg"), + "image/jpeg", + "trent reznor looking handsome as balls", + "LEDara58O=t5EMSOENEN9]}?aK%0"), + }, }, ), "https://unknown-instance.com/users/brand_new_person/statuses/01FE4NTHKWW7THT67EF10EB839": NewAPNote( - URLMustParse("https://unknown-instance.com/users/brand_new_person/statuses/01FE4NTHKWW7THT67EF10EB839"), - URLMustParse("https://unknown-instance.com/users/@brand_new_person/01FE4NTHKWW7THT67EF10EB839"), - TimeMustParse("2022-07-13T12:13:12+02:00"), - "Hello world!", - "", - URLMustParse("https://unknown-instance.com/users/brand_new_person"), - []*url.URL{ - ap.PublicURI(), + &NewAPNoteParams{ + ID: URLMustParse("https://unknown-instance.com/users/brand_new_person/statuses/01FE4NTHKWW7THT67EF10EB839"), + URL: URLMustParse("https://unknown-instance.com/users/@brand_new_person/01FE4NTHKWW7THT67EF10EB839"), + CreatedAt: TimeMustParse("2022-07-13T12:13:12+02:00"), + Content: "Hello world!", + AttributedTo: URLMustParse("https://unknown-instance.com/users/brand_new_person"), + To: []*url.URL{ + ap.PublicIRI(), + }, }, - []*url.URL{}, - false, - nil, - []vocab.TootHashtag{}, - nil, ), "https://unknown-instance.com/users/brand_new_person/statuses/01FE5Y30E3W4P7TRE0R98KAYQV": NewAPNote( - URLMustParse("https://unknown-instance.com/users/brand_new_person/statuses/01FE5Y30E3W4P7TRE0R98KAYQV"), - URLMustParse("https://unknown-instance.com/users/@brand_new_person/01FE5Y30E3W4P7TRE0R98KAYQV"), - TimeMustParse("2022-07-13T12:13:12+02:00"), - "Hey @the_mighty_zork@localhost:8080 how's it going?", - "", - URLMustParse("https://unknown-instance.com/users/brand_new_person"), - []*url.URL{ - ap.PublicURI(), + &NewAPNoteParams{ + ID: URLMustParse("https://unknown-instance.com/users/brand_new_person/statuses/01FE5Y30E3W4P7TRE0R98KAYQV"), + URL: URLMustParse("https://unknown-instance.com/users/@brand_new_person/01FE5Y30E3W4P7TRE0R98KAYQV"), + CreatedAt: TimeMustParse("2022-07-13T12:13:12+02:00"), + Content: "Hey @the_mighty_zork@localhost:8080 how's it going?", + AttributedTo: URLMustParse("https://unknown-instance.com/users/brand_new_person"), + To: []*url.URL{ + ap.PublicIRI(), + }, + Mentions: []vocab.ActivityStreamsMention{ + newAPMention( + URLMustParse("http://localhost:8080/users/the_mighty_zork"), + "@the_mighty_zork@localhost:8080", + ), + }, }, - []*url.URL{}, - false, - []vocab.ActivityStreamsMention{ - newAPMention( - URLMustParse("http://localhost:8080/users/the_mighty_zork"), - "@the_mighty_zork@localhost:8080", - ), - }, - []vocab.TootHashtag{}, - nil, ), "https://unknown-instance.com/users/brand_new_person/statuses/01H641QSRS3TCXSVC10X4GPKW7": NewAPNote( - URLMustParse("https://unknown-instance.com/users/brand_new_person/statuses/01H641QSRS3TCXSVC10X4GPKW7"), - URLMustParse("https://unknown-instance.com/users/@brand_new_person/01H641QSRS3TCXSVC10X4GPKW7"), - TimeMustParse("2023-04-12T12:13:12+02:00"), - "Babe are you okay, you've hardly touched your #piss
", - "", - URLMustParse("https://unknown-instance.com/users/brand_new_person"), - []*url.URL{ - ap.PublicURI(), + &NewAPNoteParams{ + ID: URLMustParse("https://unknown-instance.com/users/brand_new_person/statuses/01H641QSRS3TCXSVC10X4GPKW7"), + URL: URLMustParse("https://unknown-instance.com/users/@brand_new_person/01H641QSRS3TCXSVC10X4GPKW7"), + CreatedAt: TimeMustParse("2023-04-12T12:13:12+02:00"), + Content: `@foss_satanBabe are you okay, you've hardly touched your #piss
`, + AttributedTo: URLMustParse("https://unknown-instance.com/users/brand_new_person"), + To: []*url.URL{ + ap.PublicIRI(), + URLMustParse("http://fossbros-anonymous.io/users/foss_satan"), + }, + Mentions: []vocab.ActivityStreamsMention{ + newAPMention( + URLMustParse("http://fossbros-anonymous.io/users/foss_satan"), + "@foss_satan@fossbros-anonymous.io", + ), + }, + Tags: []vocab.TootHashtag{ + newAPHashtag( + URLMustParse("https://unknown-instance.com/tags/piss"), + "#piss", + ), + }, + InReplyTo: URLMustParse("http://fossbros-anonymous.io/users/foss_satan/statuses/01FVW7JHQFSFK166WWKR8CBA6M"), }, - []*url.URL{}, - false, - []vocab.ActivityStreamsMention{}, - []vocab.TootHashtag{ - newAPHashtag( - URLMustParse("https://unknown-instance.com/tags/piss"), - "#piss", - ), - }, - nil, ), "https://turnip.farm/users/turniplover6969/statuses/70c53e54-3146-42d5-a630-83c8b6c7c042": NewAPNote( - URLMustParse("https://turnip.farm/users/turniplover6969/statuses/70c53e54-3146-42d5-a630-83c8b6c7c042"), - URLMustParse("https://turnip.farm/@turniplover6969/70c53e54-3146-42d5-a630-83c8b6c7c042"), - TimeMustParse("2022-07-13T12:13:12+02:00"), - "", - "", - URLMustParse("https://turnip.farm/users/turniplover6969"), - []*url.URL{ - ap.PublicURI(), - }, - []*url.URL{}, - false, - nil, - []vocab.TootHashtag{}, - []vocab.ActivityStreamsImage{ - newAPImage( - URLMustParse("https://turnip.farm/attachments/f17843c7-015e-4251-9b5a-91389c49ee57.jpg"), - "image/jpeg", - "", - "", - ), + &NewAPNoteParams{ + ID: URLMustParse("https://turnip.farm/users/turniplover6969/statuses/70c53e54-3146-42d5-a630-83c8b6c7c042"), + URL: URLMustParse("https://turnip.farm/@turniplover6969/70c53e54-3146-42d5-a630-83c8b6c7c042"), + CreatedAt: TimeMustParse("2022-07-13T12:13:12+02:00"), + AttributedTo: URLMustParse("https://turnip.farm/users/turniplover6969"), + To: []*url.URL{ + ap.PublicIRI(), + }, + Attachments: []vocab.ActivityStreamsImage{ + newAPImage( + URLMustParse("https://turnip.farm/attachments/f17843c7-015e-4251-9b5a-91389c49ee57.jpg"), + "image/jpeg", + "", + "", + ), + }, }, ), "http://fossbros-anonymous.io/users/foss_satan/statuses/106221634728637552": NewAPNote( - URLMustParse("http://fossbros-anonymous.io/users/foss_satan/statuses/106221634728637552"), - URLMustParse("http://fossbros-anonymous.io/@foss_satan/106221634728637552"), - TimeMustParse("2022-07-13T12:13:12+02:00"), - `@the_mighty_zork nice there it is:
https://social.pixie.town/users/f0x/statuses/106221628567855262/activity
`, - "", - URLMustParse("http://fossbros-anonymous.io/users/foss_satan"), - []*url.URL{ - ap.PublicURI(), + &NewAPNoteParams{ + ID: URLMustParse("http://fossbros-anonymous.io/users/foss_satan/statuses/106221634728637552"), + URL: URLMustParse("http://fossbros-anonymous.io/@foss_satan/106221634728637552"), + CreatedAt: TimeMustParse("2022-07-13T12:13:12+02:00"), + Content: `@the_mighty_zork nice there it is:
https://social.pixie.town/users/f0x/statuses/106221628567855262/activity
`, + AttributedTo: URLMustParse("http://fossbros-anonymous.io/users/foss_satan"), + To: []*url.URL{ + ap.PublicIRI(), + }, + Mentions: []vocab.ActivityStreamsMention{ + newAPMention( + URLMustParse("http://localhost:8080/users/the_mighty_zork"), + "@the_mighty_zork@localhost:8080", + ), + }, }, - []*url.URL{}, - false, - []vocab.ActivityStreamsMention{ - newAPMention( - URLMustParse("http://localhost:8080/users/the_mighty_zork"), - "@the_mighty_zork@localhost:8080", - ), - }, - []vocab.TootHashtag{}, - nil, ), } } @@ -4235,14 +4217,21 @@ func NewTestWebPushSubscriptions() map[string]*gtsmodel.WebPushSubscription { func NewTestInteractionRequests() map[string]*gtsmodel.InteractionRequest { return map[string]*gtsmodel.InteractionRequest{ + // Impolite reply request. + // + // TODO: in v0.21.0 change this to a polite + // reply request, as this is a local interaction + // request, and polite is the only kind we'll + // be sending out *ourselves* from then on. "admin_account_reply_turtle": { - ID: "01J5QVXCCEATJYSXM9H6MZT4JR", - CreatedAt: TimeMustParse("2024-02-20T12:41:37+02:00"), - StatusID: "01F8MHC8VWDRBQR0N1BATDDEM5", - TargetAccountID: "01F8MH5NBDF2MV7CTC4Q5128HF", - InteractingAccountID: "01F8MH17FWEB39HZJ76B6VXSKF", - InteractionURI: "http://localhost:8080/users/admin/statuses/01J5QVB9VC76NPPRQ207GG4DRZ", - InteractionType: gtsmodel.InteractionReply, + ID: "01J5QVXCCEATJYSXM9H6MZT4JR", + TargetStatusID: "01F8MHC8VWDRBQR0N1BATDDEM5", + TargetAccountID: "01F8MH5NBDF2MV7CTC4Q5128HF", + InteractingAccountID: "01F8MH17FWEB39HZJ76B6VXSKF", + InteractionURI: "http://localhost:8080/users/admin/statuses/01J5QVB9VC76NPPRQ207GG4DRZ", + InteractionRequestURI: "http://localhost:8080/users/admin/statuses/01J5QVB9VC76NPPRQ207GG4DRZ#ReplyRequest", + InteractionType: gtsmodel.InteractionReply, + Polite: util.Ptr(false), }, } } @@ -5080,99 +5069,103 @@ func newAPEmoji(id *url.URL, name string, updated time.Time, image vocab.Activit return emoji } -// NewAPNote returns a new activity streams note for the given parameters -func NewAPNote( - noteID *url.URL, - noteURL *url.URL, - noteCreatedAt time.Time, - noteContent string, - noteSummary string, - noteAttributedTo *url.URL, - noteTo []*url.URL, - noteCC []*url.URL, - noteSensitive bool, - noteMentions []vocab.ActivityStreamsMention, - noteTags []vocab.TootHashtag, - noteAttachments []vocab.ActivityStreamsImage, -) vocab.ActivityStreamsNote { - // create the note itself +type NewAPNoteParams struct { + ID *url.URL + URL *url.URL + CreatedAt time.Time + Content string + Summary string + AttributedTo *url.URL + To []*url.URL + CC []*url.URL + Sensitive bool + Mentions []vocab.ActivityStreamsMention + Tags []vocab.TootHashtag + Attachments []vocab.ActivityStreamsImage + InReplyTo *url.URL + ApprovedBy *url.URL + ReplyAuthorization *url.URL +} + +// NewAPNote is a utility function that returns a new +// activity streams note using the given parameters. +func NewAPNote(p *NewAPNoteParams) vocab.ActivityStreamsNote { + // Instantiate the note itself. note := streams.NewActivityStreamsNote() - // set id - if noteID != nil { - id := streams.NewJSONLDIdProperty() - id.Set(noteID) - note.SetJSONLDId(id) + // Set id. + if p.ID != nil { + ap.SetJSONLDId(note, p.ID) } - // set noteURL - if noteURL != nil { - url := streams.NewActivityStreamsUrlProperty() - url.AppendIRI(noteURL) - note.SetActivityStreamsUrl(url) + // Set noteURL. + if p.URL != nil { + ap.AppendURL(note, p.URL) } - published := streams.NewActivityStreamsPublishedProperty() - published.Set(noteCreatedAt) - note.SetActivityStreamsPublished(published) + // Set published. + ap.SetPublished(note, p.CreatedAt) - // set noteContent - if noteContent != "" { - content := streams.NewActivityStreamsContentProperty() - content.AppendXMLSchemaString(noteContent) - note.SetActivityStreamsContent(content) + // Set content. + if p.Content != "" { + ap.AppendContent(note, p.Content) } - // set noteSummary (aka content warning) - if noteSummary != "" { - summary := streams.NewActivityStreamsSummaryProperty() - summary.AppendXMLSchemaString(noteSummary) - note.SetActivityStreamsSummary(summary) + // Set summary (aka content warning). + if p.Summary != "" { + ap.AppendSummary(note, p.Summary) } - // set noteAttributedTo (the url of the author of the note) - if noteAttributedTo != nil { - attributedTo := streams.NewActivityStreamsAttributedToProperty() - attributedTo.AppendIRI(noteAttributedTo) - note.SetActivityStreamsAttributedTo(attributedTo) + // Set attributedTo (ie., the + // uri of the author of the note). + if p.AttributedTo != nil { + ap.AppendAttributedTo(note, p.AttributedTo) } - // set noteTO - if noteTo != nil { - to := streams.NewActivityStreamsToProperty() - for _, r := range noteTo { - to.AppendIRI(r) - } - note.SetActivityStreamsTo(to) + // Set `to`. + if p.To != nil { + ap.AppendTo(note, p.To...) } - // set noteCC - if noteCC != nil { - cc := streams.NewActivityStreamsCcProperty() - for _, r := range noteCC { - cc.AppendIRI(r) - } - note.SetActivityStreamsCc(cc) + // Set `cc`. + if p.CC != nil { + ap.AppendCc(note, p.CC...) + } + + // Set `inReplyTo`. + if p.InReplyTo != nil { + ap.AppendInReplyTo(note, p.InReplyTo) + } + + // Set `approvedBy`. + if p.ApprovedBy != nil { + ap.SetApprovedBy(note, p.ApprovedBy) + } + + // Set `replyAuthorization`. + if p.ReplyAuthorization != nil { + ap.SetReplyAuthorization(note, p.ReplyAuthorization) } // Tag entries tag := streams.NewActivityStreamsTagProperty() - // mentions - for _, m := range noteMentions { + // Set mentions. + for _, m := range p.Mentions { tag.AppendActivityStreamsMention(m) } note.SetActivityStreamsTag(tag) - // hashtags - for _, t := range noteTags { + // Set hashtags. + for _, t := range p.Tags { tag.AppendTootHashtag(t) } - // append any attachments as ActivityStreamsImage - if noteAttachments != nil { + // Append any attachments + // as ActivityStreamsImage + if p.Attachments != nil { attachmentProperty := streams.NewActivityStreamsAttachmentProperty() - for _, a := range noteAttachments { + for _, a := range p.Attachments { attachmentProperty.AppendActivityStreamsImage(a) } note.SetActivityStreamsAttachment(attachmentProperty) diff --git a/vendor/code.superseriousbusiness.org/activity/streams/gen_consts.go b/vendor/code.superseriousbusiness.org/activity/streams/gen_consts.go index 0eb116f40..6caf143f8 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/gen_consts.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/gen_consts.go @@ -254,6 +254,9 @@ var ActivityStreamsAltitudePropertyName string = "altitude" // GoToSocialAlwaysPropertyName is the string literal of the name for the always property in the GoToSocial vocabulary. var GoToSocialAlwaysPropertyName string = "always" +// GoToSocialAnnounceAuthorizationPropertyName is the string literal of the name for the announceAuthorization property in the GoToSocial vocabulary. +var GoToSocialAnnounceAuthorizationPropertyName string = "announceAuthorization" + // ActivityStreamsAnyOfPropertyName is the string literal of the name for the anyOf property in the ActivityStreams vocabulary. var ActivityStreamsAnyOfPropertyName string = "anyOf" @@ -404,6 +407,9 @@ var ActivityStreamsLastPropertyName string = "last" // ActivityStreamsLatitudePropertyName is the string literal of the name for the latitude property in the ActivityStreams vocabulary. var ActivityStreamsLatitudePropertyName string = "latitude" +// GoToSocialLikeAuthorizationPropertyName is the string literal of the name for the likeAuthorization property in the GoToSocial vocabulary. +var GoToSocialLikeAuthorizationPropertyName string = "likeAuthorization" + // ActivityStreamsLikedPropertyName is the string literal of the name for the liked property in the ActivityStreams vocabulary. var ActivityStreamsLikedPropertyName string = "liked" @@ -491,6 +497,9 @@ var ActivityStreamsRelationshipPropertyName string = "relationship" // ActivityStreamsRepliesPropertyName is the string literal of the name for the replies property in the ActivityStreams vocabulary. var ActivityStreamsRepliesPropertyName string = "replies" +// GoToSocialReplyAuthorizationPropertyName is the string literal of the name for the replyAuthorization property in the GoToSocial vocabulary. +var GoToSocialReplyAuthorizationPropertyName string = "replyAuthorization" + // ActivityStreamsResultPropertyName is the string literal of the name for the result property in the ActivityStreams vocabulary. var ActivityStreamsResultPropertyName string = "result" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/gen_init.go b/vendor/code.superseriousbusiness.org/activity/streams/gen_init.go index e837355d9..b34f706b7 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/gen_init.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/gen_init.go @@ -140,6 +140,7 @@ import ( typelibrary "code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_library" typetrack "code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_track" propertyalways "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_always" + propertyannounceauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization" propertyapprovalrequired "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvalrequired" propertyapprovedby "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvedby" propertyautomaticapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_automaticapproval" @@ -152,7 +153,9 @@ import ( propertyinteractingobject "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactingobject" propertyinteractionpolicy "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactionpolicy" propertyinteractiontarget "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactiontarget" + propertylikeauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization" propertymanualapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_manualapproval" + propertyreplyauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization" typeannounceapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announceapproval" typeannounceauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announceauthorization" typeannouncerequest "code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announcerequest" @@ -337,6 +340,7 @@ func init() { typelibrary.SetManager(mgr) typetrack.SetManager(mgr) propertyalways.SetManager(mgr) + propertyannounceauthorization.SetManager(mgr) propertyapprovalrequired.SetManager(mgr) propertyapprovedby.SetManager(mgr) propertyautomaticapproval.SetManager(mgr) @@ -349,7 +353,9 @@ func init() { propertyinteractingobject.SetManager(mgr) propertyinteractionpolicy.SetManager(mgr) propertyinteractiontarget.SetManager(mgr) + propertylikeauthorization.SetManager(mgr) propertymanualapproval.SetManager(mgr) + propertyreplyauthorization.SetManager(mgr) typeannounceapproval.SetManager(mgr) typeannounceauthorization.SetManager(mgr) typeannouncerequest.SetManager(mgr) diff --git a/vendor/code.superseriousbusiness.org/activity/streams/gen_manager.go b/vendor/code.superseriousbusiness.org/activity/streams/gen_manager.go index 90a6b33c7..b181e858c 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/gen_manager.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/gen_manager.go @@ -140,6 +140,7 @@ import ( typelibrary "code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_library" typetrack "code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_track" propertyalways "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_always" + propertyannounceauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization" propertyapprovalrequired "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvalrequired" propertyapprovedby "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvedby" propertyautomaticapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_automaticapproval" @@ -152,7 +153,9 @@ import ( propertyinteractingobject "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactingobject" propertyinteractionpolicy "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactionpolicy" propertyinteractiontarget "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactiontarget" + propertylikeauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization" propertymanualapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_manualapproval" + propertyreplyauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization" typeannounceapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announceapproval" typeannounceauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announceauthorization" typeannouncerequest "code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announcerequest" @@ -351,6 +354,19 @@ func (this Manager) DeserializeAnnounceAuthorizationGoToSocial() func(map[string } } +// DeserializeAnnounceAuthorizationPropertyGoToSocial returns the deserialization +// method for the "GoToSocialAnnounceAuthorizationProperty" non-functional +// property in the vocabulary "GoToSocial" +func (this Manager) DeserializeAnnounceAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialAnnounceAuthorizationProperty, error) { + return func(m map[string]interface{}, aliasMap map[string]string) (vocab.GoToSocialAnnounceAuthorizationProperty, error) { + i, err := propertyannounceauthorization.DeserializeAnnounceAuthorizationProperty(m, aliasMap) + if i == nil { + return nil, err + } + return i, err + } +} + // DeserializeAnnounceRequestGoToSocial returns the deserialization method for the // "GoToSocialAnnounceRequest" non-functional property in the vocabulary // "GoToSocial" @@ -1469,6 +1485,19 @@ func (this Manager) DeserializeLikeAuthorizationGoToSocial() func(map[string]int } } +// DeserializeLikeAuthorizationPropertyGoToSocial returns the deserialization +// method for the "GoToSocialLikeAuthorizationProperty" non-functional +// property in the vocabulary "GoToSocial" +func (this Manager) DeserializeLikeAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialLikeAuthorizationProperty, error) { + return func(m map[string]interface{}, aliasMap map[string]string) (vocab.GoToSocialLikeAuthorizationProperty, error) { + i, err := propertylikeauthorization.DeserializeLikeAuthorizationProperty(m, aliasMap) + if i == nil { + return nil, err + } + return i, err + } +} + // DeserializeLikeRequestGoToSocial returns the deserialization method for the // "GoToSocialLikeRequest" non-functional property in the vocabulary // "GoToSocial" @@ -2132,6 +2161,19 @@ func (this Manager) DeserializeReplyAuthorizationGoToSocial() func(map[string]in } } +// DeserializeReplyAuthorizationPropertyGoToSocial returns the deserialization +// method for the "GoToSocialReplyAuthorizationProperty" non-functional +// property in the vocabulary "GoToSocial" +func (this Manager) DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) { + return func(m map[string]interface{}, aliasMap map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) { + i, err := propertyreplyauthorization.DeserializeReplyAuthorizationProperty(m, aliasMap) + if i == nil { + return nil, err + } + return i, err + } +} + // DeserializeReplyRequestGoToSocial returns the deserialization method for the // "GoToSocialReplyRequest" non-functional property in the vocabulary // "GoToSocial" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/gen_pkg_gotosocial_property_constructors.go b/vendor/code.superseriousbusiness.org/activity/streams/gen_pkg_gotosocial_property_constructors.go index c4cd38bba..af56d3bb9 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/gen_pkg_gotosocial_property_constructors.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/gen_pkg_gotosocial_property_constructors.go @@ -4,6 +4,7 @@ package streams import ( propertyalways "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_always" + propertyannounceauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization" propertyapprovalrequired "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvalrequired" propertyapprovedby "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvedby" propertyautomaticapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_automaticapproval" @@ -16,7 +17,9 @@ import ( propertyinteractingobject "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactingobject" propertyinteractionpolicy "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactionpolicy" propertyinteractiontarget "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactiontarget" + propertylikeauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization" propertymanualapproval "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_manualapproval" + propertyreplyauthorization "code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization" vocab "code.superseriousbusiness.org/activity/streams/vocab" ) @@ -25,6 +28,12 @@ func NewGoToSocialAlwaysProperty() vocab.GoToSocialAlwaysProperty { return propertyalways.NewGoToSocialAlwaysProperty() } +// NewGoToSocialGoToSocialAnnounceAuthorizationProperty creates a new +// GoToSocialAnnounceAuthorizationProperty +func NewGoToSocialAnnounceAuthorizationProperty() vocab.GoToSocialAnnounceAuthorizationProperty { + return propertyannounceauthorization.NewGoToSocialAnnounceAuthorizationProperty() +} + // NewGoToSocialGoToSocialApprovalRequiredProperty creates a new // GoToSocialApprovalRequiredProperty func NewGoToSocialApprovalRequiredProperty() vocab.GoToSocialApprovalRequiredProperty { @@ -94,8 +103,20 @@ func NewGoToSocialInteractionTargetProperty() vocab.GoToSocialInteractionTargetP return propertyinteractiontarget.NewGoToSocialInteractionTargetProperty() } +// NewGoToSocialGoToSocialLikeAuthorizationProperty creates a new +// GoToSocialLikeAuthorizationProperty +func NewGoToSocialLikeAuthorizationProperty() vocab.GoToSocialLikeAuthorizationProperty { + return propertylikeauthorization.NewGoToSocialLikeAuthorizationProperty() +} + // NewGoToSocialGoToSocialManualApprovalProperty creates a new // GoToSocialManualApprovalProperty func NewGoToSocialManualApprovalProperty() vocab.GoToSocialManualApprovalProperty { return propertymanualapproval.NewGoToSocialManualApprovalProperty() } + +// NewGoToSocialGoToSocialReplyAuthorizationProperty creates a new +// GoToSocialReplyAuthorizationProperty +func NewGoToSocialReplyAuthorizationProperty() vocab.GoToSocialReplyAuthorizationProperty { + return propertyreplyauthorization.NewGoToSocialReplyAuthorizationProperty() +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_pkg.go index 7ecd4121b..924cec939 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_pkg.go @@ -19,6 +19,11 @@ type privateManager interface { // method for the "ActivityStreamsAltitudeProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeAltitudePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAltitudeProperty, error) + // DeserializeAnnounceAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialAnnounceAuthorizationProperty" non-functional property + // in the vocabulary "GoToSocial" + DeserializeAnnounceAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialAnnounceAuthorizationProperty, error) // DeserializeApprovedByPropertyGoToSocial returns the deserialization // method for the "GoToSocialApprovedByProperty" non-functional // property in the vocabulary "GoToSocial" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_type_activitystreams_announce.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_type_activitystreams_announce.go index 0851dfa94..9906fdd49 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_type_activitystreams_announce.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_announce/gen_type_activitystreams_announce.go @@ -31,48 +31,49 @@ import ( // "type": "Announce" // } type ActivityStreamsAnnounce struct { - ActivityStreamsActor vocab.ActivityStreamsActorProperty - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInstrument vocab.ActivityStreamsInstrumentProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsOrigin vocab.ActivityStreamsOriginProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsResult vocab.ActivityStreamsResultProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTarget vocab.ActivityStreamsTargetProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsActor vocab.ActivityStreamsActorProperty + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialAnnounceAuthorization vocab.GoToSocialAnnounceAuthorizationProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInstrument vocab.ActivityStreamsInstrumentProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsOrigin vocab.ActivityStreamsOriginProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsResult vocab.ActivityStreamsResultProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTarget vocab.ActivityStreamsTargetProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsAnnounceExtends returns true if the Announce type extends from @@ -154,6 +155,11 @@ func DeserializeAnnounce(m map[string]interface{}, aliasMap map[string]string) ( } else if p != nil { this.ActivityStreamsAltitude = p } + if p, err := mgr.DeserializeAnnounceAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialAnnounceAuthorization = p + } if p, err := mgr.DeserializeApprovedByPropertyGoToSocial()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -353,6 +359,8 @@ func DeserializeAnnounce(m map[string]interface{}, aliasMap map[string]string) ( continue } else if k == "altitude" { continue + } else if k == "announceAuthorization" { + continue } else if k == "approvedBy" { continue } else if k == "attachment" { @@ -684,6 +692,12 @@ func (this ActivityStreamsAnnounce) GetActivityStreamsUrl() vocab.ActivityStream return this.ActivityStreamsUrl } +// GetGoToSocialAnnounceAuthorization returns the "announceAuthorization" property +// if it exists, and nil otherwise. +func (this ActivityStreamsAnnounce) GetGoToSocialAnnounceAuthorization() vocab.GoToSocialAnnounceAuthorizationProperty { + return this.GoToSocialAnnounceAuthorization +} + // GetGoToSocialApprovedBy returns the "approvedBy" property if it exists, and nil // otherwise. func (this ActivityStreamsAnnounce) GetGoToSocialApprovedBy() vocab.GoToSocialApprovedByProperty { @@ -727,6 +741,7 @@ func (this ActivityStreamsAnnounce) JSONLDContext() map[string]string { m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias} m = this.helperJSONLDContext(this.ActivityStreamsActor, m) m = this.helperJSONLDContext(this.ActivityStreamsAltitude, m) + m = this.helperJSONLDContext(this.GoToSocialAnnounceAuthorization, m) m = this.helperJSONLDContext(this.GoToSocialApprovedBy, m) m = this.helperJSONLDContext(this.ActivityStreamsAttachment, m) m = this.helperJSONLDContext(this.ActivityStreamsAttributedTo, m) @@ -801,6 +816,20 @@ func (this ActivityStreamsAnnounce) LessThan(o vocab.ActivityStreamsAnnounce) bo // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "announceAuthorization" + if lhs, rhs := this.GoToSocialAnnounceAuthorization, o.GetGoToSocialAnnounceAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "approvedBy" if lhs, rhs := this.GoToSocialApprovedBy, o.GetGoToSocialApprovedBy(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1372,6 +1401,14 @@ func (this ActivityStreamsAnnounce) Serialize() (map[string]interface{}, error) m[this.ActivityStreamsAltitude.Name()] = i } } + // Maybe serialize property "announceAuthorization" + if this.GoToSocialAnnounceAuthorization != nil { + if i, err := this.GoToSocialAnnounceAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialAnnounceAuthorization.Name()] = i + } + } // Maybe serialize property "approvedBy" if this.GoToSocialApprovedBy != nil { if i, err := this.GoToSocialApprovedBy.Serialize(); err != nil { @@ -1875,6 +1912,11 @@ func (this *ActivityStreamsAnnounce) SetActivityStreamsUrl(i vocab.ActivityStrea this.ActivityStreamsUrl = i } +// SetGoToSocialAnnounceAuthorization sets the "announceAuthorization" property. +func (this *ActivityStreamsAnnounce) SetGoToSocialAnnounceAuthorization(i vocab.GoToSocialAnnounceAuthorizationProperty) { + this.GoToSocialAnnounceAuthorization = i +} + // SetGoToSocialApprovedBy sets the "approvedBy" property. func (this *ActivityStreamsAnnounce) SetGoToSocialApprovedBy(i vocab.GoToSocialApprovedByProperty) { this.GoToSocialApprovedBy = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_pkg.go index e3ebfdb94..bba914f0a 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_pkg.go @@ -117,6 +117,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_type_activitystreams_article.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_type_activitystreams_article.go index 8a0229af7..3de164802 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_type_activitystreams_article.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_article/gen_type_activitystreams_article.go @@ -22,44 +22,45 @@ import ( // "type": "Article" // } type ActivityStreamsArticle struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsArticleExtends returns true if the Article type extends from the @@ -261,6 +262,11 @@ func DeserializeArticle(m map[string]interface{}, aliasMap map[string]string) (* } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -372,6 +378,8 @@ func DeserializeArticle(m map[string]interface{}, aliasMap map[string]string) (* continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -625,6 +633,12 @@ func (this ActivityStreamsArticle) GetGoToSocialInteractionPolicy() vocab.GoToSo return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsArticle) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsArticle) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -686,6 +700,7 @@ func (this ActivityStreamsArticle) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1068,6 +1083,20 @@ func (this ActivityStreamsArticle) LessThan(o vocab.ActivityStreamsArticle) bool // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1439,6 +1468,14 @@ func (this ActivityStreamsArticle) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1703,6 +1740,11 @@ func (this *ActivityStreamsArticle) SetGoToSocialInteractionPolicy(i vocab.GoToS this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsArticle) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsArticle) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_pkg.go index 729435fbd..aaaa194c7 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_pkg.go @@ -125,6 +125,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_type_activitystreams_audio.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_type_activitystreams_audio.go index bb6664c2c..5b633801f 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_type_activitystreams_audio.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_audio/gen_type_activitystreams_audio.go @@ -22,46 +22,47 @@ import ( // } // } type ActivityStreamsAudio struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - TootBlurhash vocab.TootBlurhashProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFocalPoint vocab.TootFocalPointProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + TootBlurhash vocab.TootBlurhashProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFocalPoint vocab.TootFocalPointProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsAudioExtends returns true if the Audio type extends from the @@ -273,6 +274,11 @@ func DeserializeAudio(m map[string]interface{}, aliasMap map[string]string) (*Ac } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -388,6 +394,8 @@ func DeserializeAudio(m map[string]interface{}, aliasMap map[string]string) (*Ac continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -641,6 +649,12 @@ func (this ActivityStreamsAudio) GetGoToSocialInteractionPolicy() vocab.GoToSoci return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsAudio) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsAudio) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -715,6 +729,7 @@ func (this ActivityStreamsAudio) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1125,6 +1140,20 @@ func (this ActivityStreamsAudio) LessThan(o vocab.ActivityStreamsAudio) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1512,6 +1541,14 @@ func (this ActivityStreamsAudio) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1776,6 +1813,11 @@ func (this *ActivityStreamsAudio) SetGoToSocialInteractionPolicy(i vocab.GoToSoc this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsAudio) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsAudio) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_pkg.go index 98036d6d1..c3e4665df 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_pkg.go @@ -125,6 +125,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_type_activitystreams_document.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_type_activitystreams_document.go index 0d2d06780..f7d823984 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_type_activitystreams_document.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_document/gen_type_activitystreams_document.go @@ -18,46 +18,47 @@ import ( // "url": "http://example.org/4q-sales-forecast.pdf" // } type ActivityStreamsDocument struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - TootBlurhash vocab.TootBlurhashProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFocalPoint vocab.TootFocalPointProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + TootBlurhash vocab.TootBlurhashProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFocalPoint vocab.TootFocalPointProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsDocumentExtends returns true if the Document type extends from @@ -249,6 +250,11 @@ func DeserializeDocument(m map[string]interface{}, aliasMap map[string]string) ( } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -364,6 +370,8 @@ func DeserializeDocument(m map[string]interface{}, aliasMap map[string]string) ( continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -642,6 +650,12 @@ func (this ActivityStreamsDocument) GetGoToSocialInteractionPolicy() vocab.GoToS return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsDocument) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsDocument) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -716,6 +730,7 @@ func (this ActivityStreamsDocument) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1126,6 +1141,20 @@ func (this ActivityStreamsDocument) LessThan(o vocab.ActivityStreamsDocument) bo // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1513,6 +1542,14 @@ func (this ActivityStreamsDocument) Serialize() (map[string]interface{}, error) m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1777,6 +1814,11 @@ func (this *ActivityStreamsDocument) SetGoToSocialInteractionPolicy(i vocab.GoTo this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsDocument) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsDocument) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_pkg.go index 6ec762ae5..c6760f1a6 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_pkg.go @@ -117,6 +117,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_type_activitystreams_event.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_type_activitystreams_event.go index 1ce5e55ba..e7de9773b 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_type_activitystreams_event.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_event/gen_type_activitystreams_event.go @@ -19,44 +19,45 @@ import ( // "type": "Event" // } type ActivityStreamsEvent struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsEventExtends returns true if the Event type extends from the @@ -238,6 +239,11 @@ func DeserializeEvent(m map[string]interface{}, aliasMap map[string]string) (*Ac } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -349,6 +355,8 @@ func DeserializeEvent(m map[string]interface{}, aliasMap map[string]string) (*Ac continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -622,6 +630,12 @@ func (this ActivityStreamsEvent) GetGoToSocialInteractionPolicy() vocab.GoToSoci return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsEvent) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsEvent) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -683,6 +697,7 @@ func (this ActivityStreamsEvent) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1065,6 +1080,20 @@ func (this ActivityStreamsEvent) LessThan(o vocab.ActivityStreamsEvent) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1436,6 +1465,14 @@ func (this ActivityStreamsEvent) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1700,6 +1737,11 @@ func (this *ActivityStreamsEvent) SetGoToSocialInteractionPolicy(i vocab.GoToSoc this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsEvent) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsEvent) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_pkg.go index 4ab62e8ae..b3bcc10c6 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_pkg.go @@ -129,6 +129,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_type_activitystreams_image.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_type_activitystreams_image.go index 23274172e..b5f446d62 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_type_activitystreams_image.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_image/gen_type_activitystreams_image.go @@ -29,48 +29,49 @@ import ( // ] // } type ActivityStreamsImage struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - TootBlurhash vocab.TootBlurhashProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFocalPoint vocab.TootFocalPointProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsHeight vocab.ActivityStreamsHeightProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - ActivityStreamsWidth vocab.ActivityStreamsWidthProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + TootBlurhash vocab.TootBlurhashProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFocalPoint vocab.TootFocalPointProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsHeight vocab.ActivityStreamsHeightProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + ActivityStreamsWidth vocab.ActivityStreamsWidthProperty + alias string + unknown map[string]interface{} } // ActivityStreamsImageExtends returns true if the Image type extends from the @@ -267,6 +268,11 @@ func DeserializeImage(m map[string]interface{}, aliasMap map[string]string) (*Ac } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -389,6 +395,8 @@ func DeserializeImage(m map[string]interface{}, aliasMap map[string]string) (*Ac continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -676,6 +684,12 @@ func (this ActivityStreamsImage) GetGoToSocialInteractionPolicy() vocab.GoToSoci return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsImage) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsImage) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -751,6 +765,7 @@ func (this ActivityStreamsImage) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1176,6 +1191,20 @@ func (this ActivityStreamsImage) LessThan(o vocab.ActivityStreamsImage) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1585,6 +1614,14 @@ func (this ActivityStreamsImage) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1867,6 +1904,11 @@ func (this *ActivityStreamsImage) SetGoToSocialInteractionPolicy(i vocab.GoToSoc this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsImage) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsImage) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_pkg.go index 2c681db43..f27026614 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_pkg.go @@ -88,6 +88,11 @@ type privateManager interface { // deserialization method for the "ActivityStreamsInstrumentProperty" // non-functional property in the vocabulary "ActivityStreams" DeserializeInstrumentPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInstrumentProperty, error) + // DeserializeLikeAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialLikeAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeLikeAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialLikeAuthorizationProperty, error) // DeserializeLikesPropertyActivityStreams returns the deserialization // method for the "ActivityStreamsLikesProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_type_activitystreams_like.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_type_activitystreams_like.go index f1f0ac6a7..d2aed32e3 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_type_activitystreams_like.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_like/gen_type_activitystreams_like.go @@ -42,6 +42,7 @@ type ActivityStreamsLike struct { ActivityStreamsImage vocab.ActivityStreamsImageProperty ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty ActivityStreamsInstrument vocab.ActivityStreamsInstrumentProperty + GoToSocialLikeAuthorization vocab.GoToSocialLikeAuthorizationProperty ActivityStreamsLikes vocab.ActivityStreamsLikesProperty ActivityStreamsLocation vocab.ActivityStreamsLocationProperty ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty @@ -211,6 +212,11 @@ func DeserializeLike(m map[string]interface{}, aliasMap map[string]string) (*Act } else if p != nil { this.ActivityStreamsInstrument = p } + if p, err := mgr.DeserializeLikeAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialLikeAuthorization = p + } if p, err := mgr.DeserializeLikesPropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -361,6 +367,8 @@ func DeserializeLike(m map[string]interface{}, aliasMap map[string]string) (*Act continue } else if k == "instrument" { continue + } else if k == "likeAuthorization" { + continue } else if k == "likes" { continue } else if k == "location" { @@ -682,6 +690,12 @@ func (this ActivityStreamsLike) GetGoToSocialApprovedBy() vocab.GoToSocialApprov return this.GoToSocialApprovedBy } +// GetGoToSocialLikeAuthorization returns the "likeAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsLike) GetGoToSocialLikeAuthorization() vocab.GoToSocialLikeAuthorizationProperty { + return this.GoToSocialLikeAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsLike) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -736,6 +750,7 @@ func (this ActivityStreamsLike) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsImage, m) m = this.helperJSONLDContext(this.ActivityStreamsInReplyTo, m) m = this.helperJSONLDContext(this.ActivityStreamsInstrument, m) + m = this.helperJSONLDContext(this.GoToSocialLikeAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) @@ -1031,6 +1046,20 @@ func (this ActivityStreamsLike) LessThan(o vocab.ActivityStreamsLike) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "likeAuthorization" + if lhs, rhs := this.GoToSocialLikeAuthorization, o.GetGoToSocialLikeAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "likes" if lhs, rhs := this.ActivityStreamsLikes, o.GetActivityStreamsLikes(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1500,6 +1529,14 @@ func (this ActivityStreamsLike) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsInstrument.Name()] = i } } + // Maybe serialize property "likeAuthorization" + if this.GoToSocialLikeAuthorization != nil { + if i, err := this.GoToSocialLikeAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialLikeAuthorization.Name()] = i + } + } // Maybe serialize property "likes" if this.ActivityStreamsLikes != nil { if i, err := this.ActivityStreamsLikes.Serialize(); err != nil { @@ -1872,6 +1909,11 @@ func (this *ActivityStreamsLike) SetGoToSocialApprovedBy(i vocab.GoToSocialAppro this.GoToSocialApprovedBy = i } +// SetGoToSocialLikeAuthorization sets the "likeAuthorization" property. +func (this *ActivityStreamsLike) SetGoToSocialLikeAuthorization(i vocab.GoToSocialLikeAuthorizationProperty) { + this.GoToSocialLikeAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsLike) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_pkg.go index 31280fdfd..b340c14b4 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_pkg.go @@ -117,6 +117,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_type_activitystreams_note.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_type_activitystreams_note.go index 15989dd87..dcb24a081 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_type_activitystreams_note.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_note/gen_type_activitystreams_note.go @@ -19,44 +19,45 @@ import ( // "type": "Note" // } type ActivityStreamsNote struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsNoteExtends returns true if the Note type extends from the other @@ -238,6 +239,11 @@ func DeserializeNote(m map[string]interface{}, aliasMap map[string]string) (*Act } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -349,6 +355,8 @@ func DeserializeNote(m map[string]interface{}, aliasMap map[string]string) (*Act continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -622,6 +630,12 @@ func (this ActivityStreamsNote) GetGoToSocialInteractionPolicy() vocab.GoToSocia return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsNote) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsNote) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -683,6 +697,7 @@ func (this ActivityStreamsNote) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1065,6 +1080,20 @@ func (this ActivityStreamsNote) LessThan(o vocab.ActivityStreamsNote) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1436,6 +1465,14 @@ func (this ActivityStreamsNote) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1700,6 +1737,11 @@ func (this *ActivityStreamsNote) SetGoToSocialInteractionPolicy(i vocab.GoToSoci this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsNote) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsNote) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_pkg.go index 6ea71e27e..2e1119eb0 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_pkg.go @@ -125,6 +125,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_type_activitystreams_page.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_type_activitystreams_page.go index 2ba55241d..13f6b40d0 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_type_activitystreams_page.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_page/gen_type_activitystreams_page.go @@ -18,46 +18,47 @@ import ( // "url": "http://example.org/weather-in-omaha.html" // } type ActivityStreamsPage struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - TootBlurhash vocab.TootBlurhashProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFocalPoint vocab.TootFocalPointProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + TootBlurhash vocab.TootBlurhashProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFocalPoint vocab.TootFocalPointProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsPageExtends returns true if the Page type extends from the other @@ -249,6 +250,11 @@ func DeserializePage(m map[string]interface{}, aliasMap map[string]string) (*Act } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -364,6 +370,8 @@ func DeserializePage(m map[string]interface{}, aliasMap map[string]string) (*Act continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -637,6 +645,12 @@ func (this ActivityStreamsPage) GetGoToSocialInteractionPolicy() vocab.GoToSocia return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsPage) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsPage) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -711,6 +725,7 @@ func (this ActivityStreamsPage) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1121,6 +1136,20 @@ func (this ActivityStreamsPage) LessThan(o vocab.ActivityStreamsPage) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1508,6 +1537,14 @@ func (this ActivityStreamsPage) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1772,6 +1809,11 @@ func (this *ActivityStreamsPage) SetGoToSocialInteractionPolicy(i vocab.GoToSoci this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsPage) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsPage) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_pkg.go index e87a1ca33..2821f74c5 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_pkg.go @@ -133,6 +133,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_type_activitystreams_place.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_type_activitystreams_place.go index 2c7f96e8d..34d0c90f9 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_type_activitystreams_place.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_place/gen_type_activitystreams_place.go @@ -29,49 +29,50 @@ import ( // "units": "miles" // } type ActivityStreamsPlace struct { - ActivityStreamsAccuracy vocab.ActivityStreamsAccuracyProperty - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLatitude vocab.ActivityStreamsLatitudeProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsLongitude vocab.ActivityStreamsLongitudeProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsRadius vocab.ActivityStreamsRadiusProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUnits vocab.ActivityStreamsUnitsProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAccuracy vocab.ActivityStreamsAccuracyProperty + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLatitude vocab.ActivityStreamsLatitudeProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsLongitude vocab.ActivityStreamsLongitudeProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsRadius vocab.ActivityStreamsRadiusProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUnits vocab.ActivityStreamsUnitsProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsPlaceExtends returns true if the Place type extends from the @@ -273,6 +274,11 @@ func DeserializePlace(m map[string]interface{}, aliasMap map[string]string) (*Ac } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -397,6 +403,8 @@ func DeserializePlace(m map[string]interface{}, aliasMap map[string]string) (*Ac continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -702,6 +710,12 @@ func (this ActivityStreamsPlace) GetGoToSocialInteractionPolicy() vocab.GoToSoci return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsPlace) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsPlace) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -767,6 +781,7 @@ func (this ActivityStreamsPlace) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsRadius, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1206,6 +1221,20 @@ func (this ActivityStreamsPlace) LessThan(o vocab.ActivityStreamsPlace) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1623,6 +1652,14 @@ func (this ActivityStreamsPlace) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1920,6 +1957,11 @@ func (this *ActivityStreamsPlace) SetGoToSocialInteractionPolicy(i vocab.GoToSoc this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsPlace) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsPlace) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_pkg.go index dbd20143d..4f01c913a 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_pkg.go @@ -121,6 +121,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_type_activitystreams_profile.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_type_activitystreams_profile.go index 7eed51390..6881acc18 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_type_activitystreams_profile.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_profile/gen_type_activitystreams_profile.go @@ -23,45 +23,46 @@ import ( // "type": "Profile" // } type ActivityStreamsProfile struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDescribes vocab.ActivityStreamsDescribesProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDescribes vocab.ActivityStreamsDescribesProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsProfileExtends returns true if the Profile type extends from the @@ -248,6 +249,11 @@ func DeserializeProfile(m map[string]interface{}, aliasMap map[string]string) (* } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -361,6 +367,8 @@ func DeserializeProfile(m map[string]interface{}, aliasMap map[string]string) (* continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -640,6 +648,12 @@ func (this ActivityStreamsProfile) GetGoToSocialInteractionPolicy() vocab.GoToSo return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsProfile) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsProfile) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -702,6 +716,7 @@ func (this ActivityStreamsProfile) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1098,6 +1113,20 @@ func (this ActivityStreamsProfile) LessThan(o vocab.ActivityStreamsProfile) bool // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1477,6 +1506,14 @@ func (this ActivityStreamsProfile) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1746,6 +1783,11 @@ func (this *ActivityStreamsProfile) SetGoToSocialInteractionPolicy(i vocab.GoToS this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsProfile) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsProfile) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_pkg.go index f2ce80982..76fb4bc0c 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_pkg.go @@ -137,6 +137,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeResultPropertyActivityStreams returns the deserialization // method for the "ActivityStreamsResultProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_type_activitystreams_question.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_type_activitystreams_question.go index f2ef016f1..61fc6ab5f 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_type_activitystreams_question.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_question/gen_type_activitystreams_question.go @@ -40,52 +40,53 @@ import ( // "type": "Question" // } type ActivityStreamsQuestion struct { - ActivityStreamsActor vocab.ActivityStreamsActorProperty - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - ActivityStreamsAnyOf vocab.ActivityStreamsAnyOfProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsClosed vocab.ActivityStreamsClosedProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInstrument vocab.ActivityStreamsInstrumentProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsOneOf vocab.ActivityStreamsOneOfProperty - ActivityStreamsOrigin vocab.ActivityStreamsOriginProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsResult vocab.ActivityStreamsResultProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTarget vocab.ActivityStreamsTargetProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - TootVotersCount vocab.TootVotersCountProperty - alias string - unknown map[string]interface{} + ActivityStreamsActor vocab.ActivityStreamsActorProperty + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + ActivityStreamsAnyOf vocab.ActivityStreamsAnyOfProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsClosed vocab.ActivityStreamsClosedProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInstrument vocab.ActivityStreamsInstrumentProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsOneOf vocab.ActivityStreamsOneOfProperty + ActivityStreamsOrigin vocab.ActivityStreamsOriginProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsResult vocab.ActivityStreamsResultProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTarget vocab.ActivityStreamsTargetProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + TootVotersCount vocab.TootVotersCountProperty + alias string + unknown map[string]interface{} } // ActivityStreamsQuestionExtends returns true if the Question type extends from @@ -292,6 +293,11 @@ func DeserializeQuestion(m map[string]interface{}, aliasMap map[string]string) ( } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeResultPropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -428,6 +434,8 @@ func DeserializeQuestion(m map[string]interface{}, aliasMap map[string]string) ( continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "result" { continue } else if k == "sensitive" { @@ -749,6 +757,12 @@ func (this ActivityStreamsQuestion) GetGoToSocialInteractionPolicy() vocab.GoToS return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsQuestion) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsQuestion) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -821,6 +835,7 @@ func (this ActivityStreamsQuestion) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsResult, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) @@ -1276,6 +1291,20 @@ func (this ActivityStreamsQuestion) LessThan(o vocab.ActivityStreamsQuestion) bo // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "result" if lhs, rhs := this.ActivityStreamsResult, o.GetActivityStreamsResult(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1729,6 +1758,14 @@ func (this ActivityStreamsQuestion) Serialize() (map[string]interface{}, error) m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "result" if this.ActivityStreamsResult != nil { if i, err := this.ActivityStreamsResult.Serialize(); err != nil { @@ -2052,6 +2089,11 @@ func (this *ActivityStreamsQuestion) SetGoToSocialInteractionPolicy(i vocab.GoTo this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsQuestion) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsQuestion) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_pkg.go index b03980b2a..91317d98c 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_pkg.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_pkg.go @@ -125,6 +125,11 @@ type privateManager interface { // method for the "ActivityStreamsRepliesProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeReplyAuthorizationPropertyGoToSocial returns the + // deserialization method for the + // "GoToSocialReplyAuthorizationProperty" non-functional property in + // the vocabulary "GoToSocial" + DeserializeReplyAuthorizationPropertyGoToSocial() func(map[string]interface{}, map[string]string) (vocab.GoToSocialReplyAuthorizationProperty, error) // DeserializeSensitivePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsSensitiveProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_type_activitystreams_video.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_type_activitystreams_video.go index c8a93e70f..d27f1652d 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_type_activitystreams_video.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/activitystreams/type_video/gen_type_activitystreams_video.go @@ -19,46 +19,47 @@ import ( // "url": "http://example.org/video.mkv" // } type ActivityStreamsVideo struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - TootBlurhash vocab.TootBlurhashProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFocalPoint vocab.TootFocalPointProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + GoToSocialApprovedBy vocab.GoToSocialApprovedByProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + TootBlurhash vocab.TootBlurhashProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFocalPoint vocab.TootFocalPointProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + GoToSocialInteractionPolicy vocab.GoToSocialInteractionPolicyProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + GoToSocialReplyAuthorization vocab.GoToSocialReplyAuthorizationProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsVideoExtends returns true if the Video type extends from the @@ -250,6 +251,11 @@ func DeserializeVideo(m map[string]interface{}, aliasMap map[string]string) (*Ac } else if p != nil { this.ActivityStreamsReplies = p } + if p, err := mgr.DeserializeReplyAuthorizationPropertyGoToSocial()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.GoToSocialReplyAuthorization = p + } if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -365,6 +371,8 @@ func DeserializeVideo(m map[string]interface{}, aliasMap map[string]string) (*Ac continue } else if k == "replies" { continue + } else if k == "replyAuthorization" { + continue } else if k == "sensitive" { continue } else if k == "shares" { @@ -638,6 +646,12 @@ func (this ActivityStreamsVideo) GetGoToSocialInteractionPolicy() vocab.GoToSoci return this.GoToSocialInteractionPolicy } +// GetGoToSocialReplyAuthorization returns the "replyAuthorization" property if it +// exists, and nil otherwise. +func (this ActivityStreamsVideo) GetGoToSocialReplyAuthorization() vocab.GoToSocialReplyAuthorizationProperty { + return this.GoToSocialReplyAuthorization +} + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. func (this ActivityStreamsVideo) GetJSONLDId() vocab.JSONLDIdProperty { return this.JSONLDId @@ -712,6 +726,7 @@ func (this ActivityStreamsVideo) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.GoToSocialReplyAuthorization, m) m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) m = this.helperJSONLDContext(this.ActivityStreamsShares, m) m = this.helperJSONLDContext(this.ActivityStreamsSource, m) @@ -1122,6 +1137,20 @@ func (this ActivityStreamsVideo) LessThan(o vocab.ActivityStreamsVideo) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "replyAuthorization" + if lhs, rhs := this.GoToSocialReplyAuthorization, o.GetGoToSocialReplyAuthorization(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "sensitive" if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1509,6 +1538,14 @@ func (this ActivityStreamsVideo) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsReplies.Name()] = i } } + // Maybe serialize property "replyAuthorization" + if this.GoToSocialReplyAuthorization != nil { + if i, err := this.GoToSocialReplyAuthorization.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.GoToSocialReplyAuthorization.Name()] = i + } + } // Maybe serialize property "sensitive" if this.ActivityStreamsSensitive != nil { if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { @@ -1773,6 +1810,11 @@ func (this *ActivityStreamsVideo) SetGoToSocialInteractionPolicy(i vocab.GoToSoc this.GoToSocialInteractionPolicy = i } +// SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. +func (this *ActivityStreamsVideo) SetGoToSocialReplyAuthorization(i vocab.GoToSocialReplyAuthorizationProperty) { + this.GoToSocialReplyAuthorization = i +} + // SetJSONLDId sets the "id" property. func (this *ActivityStreamsVideo) SetJSONLDId(i vocab.JSONLDIdProperty) { this.JSONLDId = i diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_doc.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_doc.go new file mode 100644 index 000000000..ace6a9aaa --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_doc.go @@ -0,0 +1,17 @@ +// Code generated by astool. DO NOT EDIT. + +// Package propertyannounceauthorization contains the implementation for the +// announceAuthorization property. All applications are strongly encouraged to +// use the interface instead of this concrete definition. The interfaces allow +// applications to consume only the types and properties needed and be +// independent of the go-fed implementation if another alternative +// implementation is created. This package is code-generated and subject to +// the same license as the go-fed tool used to generate it. +// +// This package is independent of other types' and properties' implementations +// by having a Manager injected into it to act as a factory for the concrete +// implementations. The implementations have been generated into their own +// separate subpackages for each vocabulary. +// +// Strongly consider using the interfaces instead of this package. +package propertyannounceauthorization diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_pkg.go new file mode 100644 index 000000000..2271a5813 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_pkg.go @@ -0,0 +1,15 @@ +// Code generated by astool. DO NOT EDIT. + +package propertyannounceauthorization + +var mgr privateManager + +// privateManager abstracts the code-generated manager that provides access to +// concrete implementations. +type privateManager interface{} + +// SetManager sets the manager package-global variable. For internal use only, do +// not use as part of Application behavior. Must be called at golang init time. +func SetManager(m privateManager) { + mgr = m +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_property_gotosocial_announceAuthorization.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_property_gotosocial_announceAuthorization.go new file mode 100644 index 000000000..dcd897abd --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization/gen_property_gotosocial_announceAuthorization.go @@ -0,0 +1,183 @@ +// Code generated by astool. DO NOT EDIT. + +package propertyannounceauthorization + +import ( + anyuri "code.superseriousbusiness.org/activity/streams/values/anyURI" + vocab "code.superseriousbusiness.org/activity/streams/vocab" + "fmt" + "net/url" +) + +// GoToSocialAnnounceAuthorizationProperty is the functional property +// "announceAuthorization". It is permitted to be a single nilable value type. +type GoToSocialAnnounceAuthorizationProperty struct { + xmlschemaAnyURIMember *url.URL + unknown interface{} + alias string +} + +// DeserializeAnnounceAuthorizationProperty creates a "announceAuthorization" +// property from an interface representation that has been unmarshalled from a +// text or binary format. +func DeserializeAnnounceAuthorizationProperty(m map[string]interface{}, aliasMap map[string]string) (*GoToSocialAnnounceAuthorizationProperty, error) { + alias := "" + if a, ok := aliasMap["https://gotosocial.org/ns"]; ok { + alias = a + } + propName := "announceAuthorization" + if len(alias) > 0 { + // Use alias both to find the property, and set within the property. + propName = fmt.Sprintf("%s:%s", alias, "announceAuthorization") + } + i, ok := m[propName] + + if ok { + if v, err := anyuri.DeserializeAnyURI(i); err == nil { + this := &GoToSocialAnnounceAuthorizationProperty{ + alias: alias, + xmlschemaAnyURIMember: v, + } + return this, nil + } + this := &GoToSocialAnnounceAuthorizationProperty{ + alias: alias, + unknown: i, + } + return this, nil + } + return nil, nil +} + +// NewGoToSocialAnnounceAuthorizationProperty creates a new announceAuthorization +// property. +func NewGoToSocialAnnounceAuthorizationProperty() *GoToSocialAnnounceAuthorizationProperty { + return &GoToSocialAnnounceAuthorizationProperty{alias: ""} +} + +// Clear ensures no value of this property is set. Calling IsXMLSchemaAnyURI +// afterwards will return false. +func (this *GoToSocialAnnounceAuthorizationProperty) Clear() { + this.unknown = nil + this.xmlschemaAnyURIMember = nil +} + +// Get returns the value of this property. When IsXMLSchemaAnyURI returns false, +// Get will return any arbitrary value. +func (this GoToSocialAnnounceAuthorizationProperty) Get() *url.URL { + return this.xmlschemaAnyURIMember +} + +// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will +// return any arbitrary value. +func (this GoToSocialAnnounceAuthorizationProperty) GetIRI() *url.URL { + return this.xmlschemaAnyURIMember +} + +// HasAny returns true if the value or IRI is set. +func (this GoToSocialAnnounceAuthorizationProperty) HasAny() bool { + return this.IsXMLSchemaAnyURI() +} + +// IsIRI returns true if this property is an IRI. +func (this GoToSocialAnnounceAuthorizationProperty) IsIRI() bool { + return this.xmlschemaAnyURIMember != nil +} + +// IsXMLSchemaAnyURI returns true if this property is set and not an IRI. +func (this GoToSocialAnnounceAuthorizationProperty) IsXMLSchemaAnyURI() bool { + return this.xmlschemaAnyURIMember != nil +} + +// JSONLDContext returns the JSONLD URIs required in the context string for this +// property and the specific values that are set. The value in the map is the +// alias used to import the property's value or values. +func (this GoToSocialAnnounceAuthorizationProperty) JSONLDContext() map[string]string { + m := map[string]string{"https://gotosocial.org/ns": this.alias} + var child map[string]string + + /* + Since the literal maps in this function are determined at + code-generation time, this loop should not overwrite an existing key with a + new value. + */ + for k, v := range child { + m[k] = v + } + return m +} + +// KindIndex computes an arbitrary value for indexing this kind of value. This is +// a leaky API detail only for folks looking to replace the go-fed +// implementation. Applications should not use this method. +func (this GoToSocialAnnounceAuthorizationProperty) KindIndex() int { + if this.IsXMLSchemaAnyURI() { + return 0 + } + if this.IsIRI() { + return -2 + } + return -1 +} + +// LessThan compares two instances of this property with an arbitrary but stable +// comparison. Applications should not use this because it is only meant to +// help alternative implementations to go-fed to be able to normalize +// nonfunctional properties. +func (this GoToSocialAnnounceAuthorizationProperty) LessThan(o vocab.GoToSocialAnnounceAuthorizationProperty) bool { + if this.IsIRI() { + // IRIs are always less than other values, none, or unknowns + return true + } else if o.IsIRI() { + // This other, none, or unknown value is always greater than IRIs + return false + } + // LessThan comparison for the single value or unknown value. + if !this.IsXMLSchemaAnyURI() && !o.IsXMLSchemaAnyURI() { + // Both are unknowns. + return false + } else if this.IsXMLSchemaAnyURI() && !o.IsXMLSchemaAnyURI() { + // Values are always greater than unknown values. + return false + } else if !this.IsXMLSchemaAnyURI() && o.IsXMLSchemaAnyURI() { + // Unknowns are always less than known values. + return true + } else { + // Actual comparison. + return anyuri.LessAnyURI(this.Get(), o.Get()) + } +} + +// Name returns the name of this property: "announceAuthorization". +func (this GoToSocialAnnounceAuthorizationProperty) Name() string { + if len(this.alias) > 0 { + return this.alias + ":" + "announceAuthorization" + } else { + return "announceAuthorization" + } +} + +// Serialize converts this into an interface representation suitable for +// marshalling into a text or binary format. Applications should not need this +// function as most typical use cases serialize types instead of individual +// properties. It is exposed for alternatives to go-fed implementations to use. +func (this GoToSocialAnnounceAuthorizationProperty) Serialize() (interface{}, error) { + if this.IsXMLSchemaAnyURI() { + return anyuri.SerializeAnyURI(this.Get()) + } + return this.unknown, nil +} + +// Set sets the value of this property. Calling IsXMLSchemaAnyURI afterwards will +// return true. +func (this *GoToSocialAnnounceAuthorizationProperty) Set(v *url.URL) { + this.Clear() + this.xmlschemaAnyURIMember = v +} + +// SetIRI sets the value of this property. Calling IsIRI afterwards will return +// true. +func (this *GoToSocialAnnounceAuthorizationProperty) SetIRI(v *url.URL) { + this.Clear() + this.Set(v) +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_doc.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_doc.go new file mode 100644 index 000000000..bbb41f098 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_doc.go @@ -0,0 +1,17 @@ +// Code generated by astool. DO NOT EDIT. + +// Package propertylikeauthorization contains the implementation for the +// likeAuthorization property. All applications are strongly encouraged to use +// the interface instead of this concrete definition. The interfaces allow +// applications to consume only the types and properties needed and be +// independent of the go-fed implementation if another alternative +// implementation is created. This package is code-generated and subject to +// the same license as the go-fed tool used to generate it. +// +// This package is independent of other types' and properties' implementations +// by having a Manager injected into it to act as a factory for the concrete +// implementations. The implementations have been generated into their own +// separate subpackages for each vocabulary. +// +// Strongly consider using the interfaces instead of this package. +package propertylikeauthorization diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_pkg.go new file mode 100644 index 000000000..c2540aed5 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_pkg.go @@ -0,0 +1,15 @@ +// Code generated by astool. DO NOT EDIT. + +package propertylikeauthorization + +var mgr privateManager + +// privateManager abstracts the code-generated manager that provides access to +// concrete implementations. +type privateManager interface{} + +// SetManager sets the manager package-global variable. For internal use only, do +// not use as part of Application behavior. Must be called at golang init time. +func SetManager(m privateManager) { + mgr = m +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_property_gotosocial_likeAuthorization.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_property_gotosocial_likeAuthorization.go new file mode 100644 index 000000000..d98c3d96f --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization/gen_property_gotosocial_likeAuthorization.go @@ -0,0 +1,182 @@ +// Code generated by astool. DO NOT EDIT. + +package propertylikeauthorization + +import ( + anyuri "code.superseriousbusiness.org/activity/streams/values/anyURI" + vocab "code.superseriousbusiness.org/activity/streams/vocab" + "fmt" + "net/url" +) + +// GoToSocialLikeAuthorizationProperty is the functional property +// "likeAuthorization". It is permitted to be a single nilable value type. +type GoToSocialLikeAuthorizationProperty struct { + xmlschemaAnyURIMember *url.URL + unknown interface{} + alias string +} + +// DeserializeLikeAuthorizationProperty creates a "likeAuthorization" property +// from an interface representation that has been unmarshalled from a text or +// binary format. +func DeserializeLikeAuthorizationProperty(m map[string]interface{}, aliasMap map[string]string) (*GoToSocialLikeAuthorizationProperty, error) { + alias := "" + if a, ok := aliasMap["https://gotosocial.org/ns"]; ok { + alias = a + } + propName := "likeAuthorization" + if len(alias) > 0 { + // Use alias both to find the property, and set within the property. + propName = fmt.Sprintf("%s:%s", alias, "likeAuthorization") + } + i, ok := m[propName] + + if ok { + if v, err := anyuri.DeserializeAnyURI(i); err == nil { + this := &GoToSocialLikeAuthorizationProperty{ + alias: alias, + xmlschemaAnyURIMember: v, + } + return this, nil + } + this := &GoToSocialLikeAuthorizationProperty{ + alias: alias, + unknown: i, + } + return this, nil + } + return nil, nil +} + +// NewGoToSocialLikeAuthorizationProperty creates a new likeAuthorization property. +func NewGoToSocialLikeAuthorizationProperty() *GoToSocialLikeAuthorizationProperty { + return &GoToSocialLikeAuthorizationProperty{alias: ""} +} + +// Clear ensures no value of this property is set. Calling IsXMLSchemaAnyURI +// afterwards will return false. +func (this *GoToSocialLikeAuthorizationProperty) Clear() { + this.unknown = nil + this.xmlschemaAnyURIMember = nil +} + +// Get returns the value of this property. When IsXMLSchemaAnyURI returns false, +// Get will return any arbitrary value. +func (this GoToSocialLikeAuthorizationProperty) Get() *url.URL { + return this.xmlschemaAnyURIMember +} + +// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will +// return any arbitrary value. +func (this GoToSocialLikeAuthorizationProperty) GetIRI() *url.URL { + return this.xmlschemaAnyURIMember +} + +// HasAny returns true if the value or IRI is set. +func (this GoToSocialLikeAuthorizationProperty) HasAny() bool { + return this.IsXMLSchemaAnyURI() +} + +// IsIRI returns true if this property is an IRI. +func (this GoToSocialLikeAuthorizationProperty) IsIRI() bool { + return this.xmlschemaAnyURIMember != nil +} + +// IsXMLSchemaAnyURI returns true if this property is set and not an IRI. +func (this GoToSocialLikeAuthorizationProperty) IsXMLSchemaAnyURI() bool { + return this.xmlschemaAnyURIMember != nil +} + +// JSONLDContext returns the JSONLD URIs required in the context string for this +// property and the specific values that are set. The value in the map is the +// alias used to import the property's value or values. +func (this GoToSocialLikeAuthorizationProperty) JSONLDContext() map[string]string { + m := map[string]string{"https://gotosocial.org/ns": this.alias} + var child map[string]string + + /* + Since the literal maps in this function are determined at + code-generation time, this loop should not overwrite an existing key with a + new value. + */ + for k, v := range child { + m[k] = v + } + return m +} + +// KindIndex computes an arbitrary value for indexing this kind of value. This is +// a leaky API detail only for folks looking to replace the go-fed +// implementation. Applications should not use this method. +func (this GoToSocialLikeAuthorizationProperty) KindIndex() int { + if this.IsXMLSchemaAnyURI() { + return 0 + } + if this.IsIRI() { + return -2 + } + return -1 +} + +// LessThan compares two instances of this property with an arbitrary but stable +// comparison. Applications should not use this because it is only meant to +// help alternative implementations to go-fed to be able to normalize +// nonfunctional properties. +func (this GoToSocialLikeAuthorizationProperty) LessThan(o vocab.GoToSocialLikeAuthorizationProperty) bool { + if this.IsIRI() { + // IRIs are always less than other values, none, or unknowns + return true + } else if o.IsIRI() { + // This other, none, or unknown value is always greater than IRIs + return false + } + // LessThan comparison for the single value or unknown value. + if !this.IsXMLSchemaAnyURI() && !o.IsXMLSchemaAnyURI() { + // Both are unknowns. + return false + } else if this.IsXMLSchemaAnyURI() && !o.IsXMLSchemaAnyURI() { + // Values are always greater than unknown values. + return false + } else if !this.IsXMLSchemaAnyURI() && o.IsXMLSchemaAnyURI() { + // Unknowns are always less than known values. + return true + } else { + // Actual comparison. + return anyuri.LessAnyURI(this.Get(), o.Get()) + } +} + +// Name returns the name of this property: "likeAuthorization". +func (this GoToSocialLikeAuthorizationProperty) Name() string { + if len(this.alias) > 0 { + return this.alias + ":" + "likeAuthorization" + } else { + return "likeAuthorization" + } +} + +// Serialize converts this into an interface representation suitable for +// marshalling into a text or binary format. Applications should not need this +// function as most typical use cases serialize types instead of individual +// properties. It is exposed for alternatives to go-fed implementations to use. +func (this GoToSocialLikeAuthorizationProperty) Serialize() (interface{}, error) { + if this.IsXMLSchemaAnyURI() { + return anyuri.SerializeAnyURI(this.Get()) + } + return this.unknown, nil +} + +// Set sets the value of this property. Calling IsXMLSchemaAnyURI afterwards will +// return true. +func (this *GoToSocialLikeAuthorizationProperty) Set(v *url.URL) { + this.Clear() + this.xmlschemaAnyURIMember = v +} + +// SetIRI sets the value of this property. Calling IsIRI afterwards will return +// true. +func (this *GoToSocialLikeAuthorizationProperty) SetIRI(v *url.URL) { + this.Clear() + this.Set(v) +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_doc.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_doc.go new file mode 100644 index 000000000..5ff0ca45d --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_doc.go @@ -0,0 +1,17 @@ +// Code generated by astool. DO NOT EDIT. + +// Package propertyreplyauthorization contains the implementation for the +// replyAuthorization property. All applications are strongly encouraged to +// use the interface instead of this concrete definition. The interfaces allow +// applications to consume only the types and properties needed and be +// independent of the go-fed implementation if another alternative +// implementation is created. This package is code-generated and subject to +// the same license as the go-fed tool used to generate it. +// +// This package is independent of other types' and properties' implementations +// by having a Manager injected into it to act as a factory for the concrete +// implementations. The implementations have been generated into their own +// separate subpackages for each vocabulary. +// +// Strongly consider using the interfaces instead of this package. +package propertyreplyauthorization diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_pkg.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_pkg.go new file mode 100644 index 000000000..a23c898d2 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_pkg.go @@ -0,0 +1,15 @@ +// Code generated by astool. DO NOT EDIT. + +package propertyreplyauthorization + +var mgr privateManager + +// privateManager abstracts the code-generated manager that provides access to +// concrete implementations. +type privateManager interface{} + +// SetManager sets the manager package-global variable. For internal use only, do +// not use as part of Application behavior. Must be called at golang init time. +func SetManager(m privateManager) { + mgr = m +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_property_gotosocial_replyAuthorization.go b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_property_gotosocial_replyAuthorization.go new file mode 100644 index 000000000..235d86b97 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization/gen_property_gotosocial_replyAuthorization.go @@ -0,0 +1,183 @@ +// Code generated by astool. DO NOT EDIT. + +package propertyreplyauthorization + +import ( + anyuri "code.superseriousbusiness.org/activity/streams/values/anyURI" + vocab "code.superseriousbusiness.org/activity/streams/vocab" + "fmt" + "net/url" +) + +// GoToSocialReplyAuthorizationProperty is the functional property +// "replyAuthorization". It is permitted to be a single nilable value type. +type GoToSocialReplyAuthorizationProperty struct { + xmlschemaAnyURIMember *url.URL + unknown interface{} + alias string +} + +// DeserializeReplyAuthorizationProperty creates a "replyAuthorization" property +// from an interface representation that has been unmarshalled from a text or +// binary format. +func DeserializeReplyAuthorizationProperty(m map[string]interface{}, aliasMap map[string]string) (*GoToSocialReplyAuthorizationProperty, error) { + alias := "" + if a, ok := aliasMap["https://gotosocial.org/ns"]; ok { + alias = a + } + propName := "replyAuthorization" + if len(alias) > 0 { + // Use alias both to find the property, and set within the property. + propName = fmt.Sprintf("%s:%s", alias, "replyAuthorization") + } + i, ok := m[propName] + + if ok { + if v, err := anyuri.DeserializeAnyURI(i); err == nil { + this := &GoToSocialReplyAuthorizationProperty{ + alias: alias, + xmlschemaAnyURIMember: v, + } + return this, nil + } + this := &GoToSocialReplyAuthorizationProperty{ + alias: alias, + unknown: i, + } + return this, nil + } + return nil, nil +} + +// NewGoToSocialReplyAuthorizationProperty creates a new replyAuthorization +// property. +func NewGoToSocialReplyAuthorizationProperty() *GoToSocialReplyAuthorizationProperty { + return &GoToSocialReplyAuthorizationProperty{alias: ""} +} + +// Clear ensures no value of this property is set. Calling IsXMLSchemaAnyURI +// afterwards will return false. +func (this *GoToSocialReplyAuthorizationProperty) Clear() { + this.unknown = nil + this.xmlschemaAnyURIMember = nil +} + +// Get returns the value of this property. When IsXMLSchemaAnyURI returns false, +// Get will return any arbitrary value. +func (this GoToSocialReplyAuthorizationProperty) Get() *url.URL { + return this.xmlschemaAnyURIMember +} + +// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will +// return any arbitrary value. +func (this GoToSocialReplyAuthorizationProperty) GetIRI() *url.URL { + return this.xmlschemaAnyURIMember +} + +// HasAny returns true if the value or IRI is set. +func (this GoToSocialReplyAuthorizationProperty) HasAny() bool { + return this.IsXMLSchemaAnyURI() +} + +// IsIRI returns true if this property is an IRI. +func (this GoToSocialReplyAuthorizationProperty) IsIRI() bool { + return this.xmlschemaAnyURIMember != nil +} + +// IsXMLSchemaAnyURI returns true if this property is set and not an IRI. +func (this GoToSocialReplyAuthorizationProperty) IsXMLSchemaAnyURI() bool { + return this.xmlschemaAnyURIMember != nil +} + +// JSONLDContext returns the JSONLD URIs required in the context string for this +// property and the specific values that are set. The value in the map is the +// alias used to import the property's value or values. +func (this GoToSocialReplyAuthorizationProperty) JSONLDContext() map[string]string { + m := map[string]string{"https://gotosocial.org/ns": this.alias} + var child map[string]string + + /* + Since the literal maps in this function are determined at + code-generation time, this loop should not overwrite an existing key with a + new value. + */ + for k, v := range child { + m[k] = v + } + return m +} + +// KindIndex computes an arbitrary value for indexing this kind of value. This is +// a leaky API detail only for folks looking to replace the go-fed +// implementation. Applications should not use this method. +func (this GoToSocialReplyAuthorizationProperty) KindIndex() int { + if this.IsXMLSchemaAnyURI() { + return 0 + } + if this.IsIRI() { + return -2 + } + return -1 +} + +// LessThan compares two instances of this property with an arbitrary but stable +// comparison. Applications should not use this because it is only meant to +// help alternative implementations to go-fed to be able to normalize +// nonfunctional properties. +func (this GoToSocialReplyAuthorizationProperty) LessThan(o vocab.GoToSocialReplyAuthorizationProperty) bool { + if this.IsIRI() { + // IRIs are always less than other values, none, or unknowns + return true + } else if o.IsIRI() { + // This other, none, or unknown value is always greater than IRIs + return false + } + // LessThan comparison for the single value or unknown value. + if !this.IsXMLSchemaAnyURI() && !o.IsXMLSchemaAnyURI() { + // Both are unknowns. + return false + } else if this.IsXMLSchemaAnyURI() && !o.IsXMLSchemaAnyURI() { + // Values are always greater than unknown values. + return false + } else if !this.IsXMLSchemaAnyURI() && o.IsXMLSchemaAnyURI() { + // Unknowns are always less than known values. + return true + } else { + // Actual comparison. + return anyuri.LessAnyURI(this.Get(), o.Get()) + } +} + +// Name returns the name of this property: "replyAuthorization". +func (this GoToSocialReplyAuthorizationProperty) Name() string { + if len(this.alias) > 0 { + return this.alias + ":" + "replyAuthorization" + } else { + return "replyAuthorization" + } +} + +// Serialize converts this into an interface representation suitable for +// marshalling into a text or binary format. Applications should not need this +// function as most typical use cases serialize types instead of individual +// properties. It is exposed for alternatives to go-fed implementations to use. +func (this GoToSocialReplyAuthorizationProperty) Serialize() (interface{}, error) { + if this.IsXMLSchemaAnyURI() { + return anyuri.SerializeAnyURI(this.Get()) + } + return this.unknown, nil +} + +// Set sets the value of this property. Calling IsXMLSchemaAnyURI afterwards will +// return true. +func (this *GoToSocialReplyAuthorizationProperty) Set(v *url.URL) { + this.Clear() + this.xmlschemaAnyURIMember = v +} + +// SetIRI sets the value of this property. Calling IsIRI afterwards will return +// true. +func (this *GoToSocialReplyAuthorizationProperty) SetIRI(v *url.URL) { + this.Clear() + this.Set(v) +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_announceAuthorization_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_announceAuthorization_interface.go new file mode 100644 index 000000000..f9542d827 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_announceAuthorization_interface.go @@ -0,0 +1,53 @@ +// Code generated by astool. DO NOT EDIT. + +package vocab + +import "net/url" + +// URI/ID of an AnnounceAuthorization permitting the Announce this property is +// attached to. +type GoToSocialAnnounceAuthorizationProperty interface { + // Clear ensures no value of this property is set. Calling + // IsXMLSchemaAnyURI afterwards will return false. + Clear() + // Get returns the value of this property. When IsXMLSchemaAnyURI returns + // false, Get will return any arbitrary value. + Get() *url.URL + // GetIRI returns the IRI of this property. When IsIRI returns false, + // GetIRI will return any arbitrary value. + GetIRI() *url.URL + // HasAny returns true if the value or IRI is set. + HasAny() bool + // IsIRI returns true if this property is an IRI. + IsIRI() bool + // IsXMLSchemaAnyURI returns true if this property is set and not an IRI. + IsXMLSchemaAnyURI() bool + // JSONLDContext returns the JSONLD URIs required in the context string + // for this property and the specific values that are set. The value + // in the map is the alias used to import the property's value or + // values. + JSONLDContext() map[string]string + // KindIndex computes an arbitrary value for indexing this kind of value. + // This is a leaky API detail only for folks looking to replace the + // go-fed implementation. Applications should not use this method. + KindIndex() int + // LessThan compares two instances of this property with an arbitrary but + // stable comparison. Applications should not use this because it is + // only meant to help alternative implementations to go-fed to be able + // to normalize nonfunctional properties. + LessThan(o GoToSocialAnnounceAuthorizationProperty) bool + // Name returns the name of this property: "announceAuthorization". + Name() string + // Serialize converts this into an interface representation suitable for + // marshalling into a text or binary format. Applications should not + // need this function as most typical use cases serialize types + // instead of individual properties. It is exposed for alternatives to + // go-fed implementations to use. + Serialize() (interface{}, error) + // Set sets the value of this property. Calling IsXMLSchemaAnyURI + // afterwards will return true. + Set(v *url.URL) + // SetIRI sets the value of this property. Calling IsIRI afterwards will + // return true. + SetIRI(v *url.URL) +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_approvedBy_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_approvedBy_interface.go index c99467246..86a98f638 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_approvedBy_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_approvedBy_interface.go @@ -4,11 +4,12 @@ package vocab import "net/url" -// URI/ID of an Accept Activity or approval, which itself points towards the ID of -// the Activity or Object to which this property is attached. The presence of -// this property on an Activity or Object indicates that an interaction has -// been Approve'd by the Actor whose Object this Activity or Object interacts -// with. +// DEPRECATED: Use `likeAuthorization`, `replyAuthorization`, or +// `announceAuthorization` instead. URI/ID of an Accept Activity or approval, +// which itself points towards the ID of the Activity or Object to which this +// property is attached. The presence of this property on an Activity or +// Object indicates that an interaction has been Approve'd by the Actor whose +// Object this Activity or Object interacts with. type GoToSocialApprovedByProperty interface { // Clear ensures no value of this property is set. Calling // IsXMLSchemaAnyURI afterwards will return false. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesCcPublicFromUnauthedWeb_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesCcPublicFromUnauthedWeb_interface.go index a84a2a366..8019bd142 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesCcPublicFromUnauthedWeb_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesCcPublicFromUnauthedWeb_interface.go @@ -8,8 +8,7 @@ import "net/url" // (Notes, Articles, etc) from unauthenticated (ie., logged-out) access via // web pages, web apps, web APIs, etc. This setting has no bearing on // dereferences via HTTP GET to ActivityPub endpoints (application/ld+json; -// profile="https://www.w3.org/ns/activitystreams"), for which GoToSocial -// always requires HTTP signatures. +// profile="https://www.w3.org/ns/activitystreams"). type GoToSocialHidesCcPublicFromUnauthedWebProperty interface { // Clear ensures no value of this property is set. Calling // IsXMLSchemaBoolean afterwards will return false. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesToPublicFromUnauthedWeb_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesToPublicFromUnauthedWeb_interface.go index f876e6eb2..e5ed0067e 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesToPublicFromUnauthedWeb_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_hidesToPublicFromUnauthedWeb_interface.go @@ -8,8 +8,7 @@ import "net/url" // (Notes, Articles, etc) from unauthenticated (ie., logged-out) access via // web pages, web apps, web APIs, etc. This setting has no bearing on // dereferences via HTTP GET to ActivityPub endpoints (application/ld+json; -// profile="https://www.w3.org/ns/activitystreams"), for which GoToSocial -// always requires HTTP signatures. +// profile="https://www.w3.org/ns/activitystreams"). type GoToSocialHidesToPublicFromUnauthedWebProperty interface { // Clear ensures no value of this property is set. Calling // IsXMLSchemaBoolean afterwards will return false. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_likeAuthorization_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_likeAuthorization_interface.go new file mode 100644 index 000000000..8c3ca0915 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_likeAuthorization_interface.go @@ -0,0 +1,52 @@ +// Code generated by astool. DO NOT EDIT. + +package vocab + +import "net/url" + +// URI/ID of a LikeAuthorization permitting the Like this property is attached to. +type GoToSocialLikeAuthorizationProperty interface { + // Clear ensures no value of this property is set. Calling + // IsXMLSchemaAnyURI afterwards will return false. + Clear() + // Get returns the value of this property. When IsXMLSchemaAnyURI returns + // false, Get will return any arbitrary value. + Get() *url.URL + // GetIRI returns the IRI of this property. When IsIRI returns false, + // GetIRI will return any arbitrary value. + GetIRI() *url.URL + // HasAny returns true if the value or IRI is set. + HasAny() bool + // IsIRI returns true if this property is an IRI. + IsIRI() bool + // IsXMLSchemaAnyURI returns true if this property is set and not an IRI. + IsXMLSchemaAnyURI() bool + // JSONLDContext returns the JSONLD URIs required in the context string + // for this property and the specific values that are set. The value + // in the map is the alias used to import the property's value or + // values. + JSONLDContext() map[string]string + // KindIndex computes an arbitrary value for indexing this kind of value. + // This is a leaky API detail only for folks looking to replace the + // go-fed implementation. Applications should not use this method. + KindIndex() int + // LessThan compares two instances of this property with an arbitrary but + // stable comparison. Applications should not use this because it is + // only meant to help alternative implementations to go-fed to be able + // to normalize nonfunctional properties. + LessThan(o GoToSocialLikeAuthorizationProperty) bool + // Name returns the name of this property: "likeAuthorization". + Name() string + // Serialize converts this into an interface representation suitable for + // marshalling into a text or binary format. Applications should not + // need this function as most typical use cases serialize types + // instead of individual properties. It is exposed for alternatives to + // go-fed implementations to use. + Serialize() (interface{}, error) + // Set sets the value of this property. Calling IsXMLSchemaAnyURI + // afterwards will return true. + Set(v *url.URL) + // SetIRI sets the value of this property. Calling IsIRI afterwards will + // return true. + SetIRI(v *url.URL) +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_replyAuthorization_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_replyAuthorization_interface.go new file mode 100644 index 000000000..078e5e3d0 --- /dev/null +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_property_gotosocial_replyAuthorization_interface.go @@ -0,0 +1,53 @@ +// Code generated by astool. DO NOT EDIT. + +package vocab + +import "net/url" + +// URI/ID of a ReplyAuthorization permitting the Object this property is attached +// to. +type GoToSocialReplyAuthorizationProperty interface { + // Clear ensures no value of this property is set. Calling + // IsXMLSchemaAnyURI afterwards will return false. + Clear() + // Get returns the value of this property. When IsXMLSchemaAnyURI returns + // false, Get will return any arbitrary value. + Get() *url.URL + // GetIRI returns the IRI of this property. When IsIRI returns false, + // GetIRI will return any arbitrary value. + GetIRI() *url.URL + // HasAny returns true if the value or IRI is set. + HasAny() bool + // IsIRI returns true if this property is an IRI. + IsIRI() bool + // IsXMLSchemaAnyURI returns true if this property is set and not an IRI. + IsXMLSchemaAnyURI() bool + // JSONLDContext returns the JSONLD URIs required in the context string + // for this property and the specific values that are set. The value + // in the map is the alias used to import the property's value or + // values. + JSONLDContext() map[string]string + // KindIndex computes an arbitrary value for indexing this kind of value. + // This is a leaky API detail only for folks looking to replace the + // go-fed implementation. Applications should not use this method. + KindIndex() int + // LessThan compares two instances of this property with an arbitrary but + // stable comparison. Applications should not use this because it is + // only meant to help alternative implementations to go-fed to be able + // to normalize nonfunctional properties. + LessThan(o GoToSocialReplyAuthorizationProperty) bool + // Name returns the name of this property: "replyAuthorization". + Name() string + // Serialize converts this into an interface representation suitable for + // marshalling into a text or binary format. Applications should not + // need this function as most typical use cases serialize types + // instead of individual properties. It is exposed for alternatives to + // go-fed implementations to use. + Serialize() (interface{}, error) + // Set sets the value of this property. Calling IsXMLSchemaAnyURI + // afterwards will return true. + Set(v *url.URL) + // SetIRI sets the value of this property. Calling IsIRI afterwards will + // return true. + SetIRI(v *url.URL) +} diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_announce_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_announce_interface.go index 0b5aef0f1..5f8cf0eef 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_announce_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_announce_interface.go @@ -136,6 +136,9 @@ type ActivityStreamsAnnounce interface { // GetActivityStreamsUrl returns the "url" property if it exists, and nil // otherwise. GetActivityStreamsUrl() ActivityStreamsUrlProperty + // GetGoToSocialAnnounceAuthorization returns the "announceAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialAnnounceAuthorization() GoToSocialAnnounceAuthorizationProperty // GetGoToSocialApprovedBy returns the "approvedBy" property if it exists, // and nil otherwise. GetGoToSocialApprovedBy() GoToSocialApprovedByProperty @@ -241,6 +244,9 @@ type ActivityStreamsAnnounce interface { SetActivityStreamsUpdated(i ActivityStreamsUpdatedProperty) // SetActivityStreamsUrl sets the "url" property. SetActivityStreamsUrl(i ActivityStreamsUrlProperty) + // SetGoToSocialAnnounceAuthorization sets the "announceAuthorization" + // property. + SetGoToSocialAnnounceAuthorization(i GoToSocialAnnounceAuthorizationProperty) // SetGoToSocialApprovedBy sets the "approvedBy" property. SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetJSONLDId sets the "id" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_article_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_article_interface.go index 149fdb6a9..1dd2a5b51 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_article_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_article_interface.go @@ -118,6 +118,9 @@ type ActivityStreamsArticle interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -214,6 +217,8 @@ type ActivityStreamsArticle interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_audio_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_audio_interface.go index 70ad5d20a..032fd5473 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_audio_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_audio_interface.go @@ -118,6 +118,9 @@ type ActivityStreamsAudio interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -219,6 +222,8 @@ type ActivityStreamsAudio interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_document_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_document_interface.go index f417c9452..0a654bfe7 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_document_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_document_interface.go @@ -114,6 +114,9 @@ type ActivityStreamsDocument interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -216,6 +219,8 @@ type ActivityStreamsDocument interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_event_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_event_interface.go index 9edbb7b36..3a9e6546e 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_event_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_event_interface.go @@ -115,6 +115,9 @@ type ActivityStreamsEvent interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -210,6 +213,8 @@ type ActivityStreamsEvent interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_image_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_image_interface.go index 5073d044a..c7fb3b69d 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_image_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_image_interface.go @@ -131,6 +131,9 @@ type ActivityStreamsImage interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -236,6 +239,8 @@ type ActivityStreamsImage interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_like_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_like_interface.go index 1dcbdd914..f4501c23e 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_like_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_like_interface.go @@ -131,6 +131,9 @@ type ActivityStreamsLike interface { // GetGoToSocialApprovedBy returns the "approvedBy" property if it exists, // and nil otherwise. GetGoToSocialApprovedBy() GoToSocialApprovedByProperty + // GetGoToSocialLikeAuthorization returns the "likeAuthorization" property + // if it exists, and nil otherwise. + GetGoToSocialLikeAuthorization() GoToSocialLikeAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -234,6 +237,8 @@ type ActivityStreamsLike interface { SetActivityStreamsUrl(i ActivityStreamsUrlProperty) // SetGoToSocialApprovedBy sets the "approvedBy" property. SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) + // SetGoToSocialLikeAuthorization sets the "likeAuthorization" property. + SetGoToSocialLikeAuthorization(i GoToSocialLikeAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_note_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_note_interface.go index d78560050..4b1ecd095 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_note_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_note_interface.go @@ -115,6 +115,9 @@ type ActivityStreamsNote interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -210,6 +213,8 @@ type ActivityStreamsNote interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_page_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_page_interface.go index 635dab3b2..935069f03 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_page_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_page_interface.go @@ -114,6 +114,9 @@ type ActivityStreamsPage interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -215,6 +218,8 @@ type ActivityStreamsPage interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_place_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_place_interface.go index 0c983542e..bdd429a42 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_place_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_place_interface.go @@ -140,6 +140,9 @@ type ActivityStreamsPlace interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -245,6 +248,8 @@ type ActivityStreamsPlace interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_profile_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_profile_interface.go index b4b8a7697..65725835b 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_profile_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_profile_interface.go @@ -122,6 +122,9 @@ type ActivityStreamsProfile interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -220,6 +223,8 @@ type ActivityStreamsProfile interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_question_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_question_interface.go index c249bfc33..44cc24d71 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_question_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_question_interface.go @@ -157,6 +157,9 @@ type ActivityStreamsQuestion interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -270,6 +273,8 @@ type ActivityStreamsQuestion interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_video_interface.go b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_video_interface.go index c42dd635a..85c788605 100644 --- a/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_video_interface.go +++ b/vendor/code.superseriousbusiness.org/activity/streams/vocab/gen_type_activitystreams_video_interface.go @@ -115,6 +115,9 @@ type ActivityStreamsVideo interface { // GetGoToSocialInteractionPolicy returns the "interactionPolicy" property // if it exists, and nil otherwise. GetGoToSocialInteractionPolicy() GoToSocialInteractionPolicyProperty + // GetGoToSocialReplyAuthorization returns the "replyAuthorization" + // property if it exists, and nil otherwise. + GetGoToSocialReplyAuthorization() GoToSocialReplyAuthorizationProperty // GetJSONLDId returns the "id" property if it exists, and nil otherwise. GetJSONLDId() JSONLDIdProperty // GetJSONLDType returns the "type" property if it exists, and nil @@ -216,6 +219,8 @@ type ActivityStreamsVideo interface { SetGoToSocialApprovedBy(i GoToSocialApprovedByProperty) // SetGoToSocialInteractionPolicy sets the "interactionPolicy" property. SetGoToSocialInteractionPolicy(i GoToSocialInteractionPolicyProperty) + // SetGoToSocialReplyAuthorization sets the "replyAuthorization" property. + SetGoToSocialReplyAuthorization(i GoToSocialReplyAuthorizationProperty) // SetJSONLDId sets the "id" property. SetJSONLDId(i JSONLDIdProperty) // SetJSONLDType sets the "type" property. diff --git a/vendor/modules.txt b/vendor/modules.txt index 9034d1476..e2faccc3c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# code.superseriousbusiness.org/activity v1.16.0 +# code.superseriousbusiness.org/activity v1.17.0 ## explicit; go 1.23 code.superseriousbusiness.org/activity/pub code.superseriousbusiness.org/activity/streams @@ -139,6 +139,7 @@ code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_artist code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_library code.superseriousbusiness.org/activity/streams/impl/funkwhale/type_track code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_always +code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_announceauthorization code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvalrequired code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_approvedby code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_automaticapproval @@ -151,7 +152,9 @@ code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_hidestop code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactingobject code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactionpolicy code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_interactiontarget +code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_likeauthorization code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_manualapproval +code.superseriousbusiness.org/activity/streams/impl/gotosocial/property_replyauthorization code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announceapproval code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announceauthorization code.superseriousbusiness.org/activity/streams/impl/gotosocial/type_announcerequest