[bugfix] Fix remaining mangled URI escaping issues in statuses + accounts (#1712)

* start fiddling with normalize + extract functions

* normalize attachment name (image description)

* NormalizeAccountableSummary

* normalize summary + name
This commit is contained in:
tobi 2023-04-26 17:17:22 +02:00 committed by GitHub
commit 6b4f6dc755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 498 additions and 49 deletions

View file

@ -30,6 +30,7 @@ type Accountable interface {
WithName
WithImage
WithSummary
WithSetSummary
WithDiscoverable
WithURL
WithPublicKey
@ -50,7 +51,9 @@ type Statusable interface {
WithTypeName
WithSummary
WithSetSummary
WithName
WithSetName
WithInReplyTo
WithPublished
WithURL
@ -73,6 +76,7 @@ type Attachmentable interface {
WithMediaType
WithURL
WithName
WithSetName
WithBlurhash
}
@ -193,6 +197,11 @@ type WithName interface {
GetActivityStreamsName() vocab.ActivityStreamsNameProperty
}
// WithSetName represents an activity with a settable ActivityStreamsNameProperty
type WithSetName interface {
SetActivityStreamsName(vocab.ActivityStreamsNameProperty)
}
// WithImage represents an activity with ActivityStreamsImageProperty
type WithImage interface {
GetActivityStreamsImage() vocab.ActivityStreamsImageProperty
@ -203,6 +212,11 @@ type WithSummary interface {
GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty
}
// WithSetSummary represents an activity that can have summary set on it.
type WithSetSummary interface {
SetActivityStreamsSummary(vocab.ActivityStreamsSummaryProperty)
}
// WithDiscoverable represents an activity with TootDiscoverableProperty
type WithDiscoverable interface {
GetTootDiscoverable() vocab.TootDiscoverableProperty