mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:32:25 -05: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:
parent
3cc51d5072
commit
aa396c78d3
11 changed files with 392 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue