mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] serdes for moved/also_known_as (#2600)
* [feature] serdes for moved/also_known_as * document `alsoKnownAs` and `movedTo` properties * only implicitly populate AKA uris from DB for local accounts * don't let remotes store more than 20 AKA uris to avoid shenanigans
This commit is contained in:
@ -160,6 +160,8 @@ type Accountable interface {
|
||||
WithFollowing
|
||||
WithFollowers
|
||||
WithFeatured
|
||||
WithMovedTo
|
||||
WithAlsoKnownAs
|
||||
WithManuallyApprovesFollowers
|
||||
WithEndpoints
|
||||
WithTag
|
||||
@ -327,7 +329,7 @@ type TypeOrIRI interface {
|
||||
}
|
||||
|
||||
// Property represents the minimum interface for an ActivityStreams property with IRIs.
|
||||
type Property[T TypeOrIRI] interface {
|
||||
type Property[T WithIRI] interface {
|
||||
Len() int
|
||||
At(int) T
|
||||
|
||||
@ -441,6 +443,18 @@ type WithFeatured interface {
|
||||
SetTootFeatured(vocab.TootFeaturedProperty)
|
||||
}
|
||||
|
||||
// WithMovedTo represents an Object with ActivityStreamsMovedToProperty.
|
||||
type WithMovedTo interface {
|
||||
GetActivityStreamsMovedTo() vocab.ActivityStreamsMovedToProperty
|
||||
SetActivityStreamsMovedTo(vocab.ActivityStreamsMovedToProperty)
|
||||
}
|
||||
|
||||
// WithAlsoKnownAs represents an Object with ActivityStreamsAlsoKnownAsProperty.
|
||||
type WithAlsoKnownAs interface {
|
||||
GetActivityStreamsAlsoKnownAs() vocab.ActivityStreamsAlsoKnownAsProperty
|
||||
SetActivityStreamsAlsoKnownAs(vocab.ActivityStreamsAlsoKnownAsProperty)
|
||||
}
|
||||
|
||||
// WithAttributedTo represents an activity with ActivityStreamsAttributedToProperty
|
||||
type WithAttributedTo interface {
|
||||
GetActivityStreamsAttributedTo() vocab.ActivityStreamsAttributedToProperty
|
||||
@ -551,6 +565,12 @@ type WithObject interface {
|
||||
SetActivityStreamsObject(vocab.ActivityStreamsObjectProperty)
|
||||
}
|
||||
|
||||
// WithTarget represents an activity with ActivityStreamsTargetProperty
|
||||
type WithTarget interface {
|
||||
GetActivityStreamsTarget() vocab.ActivityStreamsTargetProperty
|
||||
SetActivityStreamsTarget(vocab.ActivityStreamsTargetProperty)
|
||||
}
|
||||
|
||||
// WithNext represents an activity with ActivityStreamsNextProperty
|
||||
type WithNext interface {
|
||||
GetActivityStreamsNext() vocab.ActivityStreamsNextProperty
|
||||
|
Reference in New Issue
Block a user