mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore/bugfix] Refactor ap/extract.go
functions, return URIs more reliably (#1897)
This commit is contained in:
@@ -69,4 +69,11 @@ const (
|
||||
ObjectCollection = "Collection" // ActivityStreamsCollection https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection
|
||||
ObjectCollectionPage = "CollectionPage" // ActivityStreamsCollectionPage https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collectionpage
|
||||
ObjectOrderedCollection = "OrderedCollection" // ActivityStreamsOrderedCollection https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection
|
||||
|
||||
// Hashtag is not in the AS spec per se, but it tends to get used
|
||||
// as though 'Hashtag' is a named type under the Tag property.
|
||||
//
|
||||
// See https://www.w3.org/TR/activitystreams-vocabulary/#microsyntaxes
|
||||
// and https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag
|
||||
TagHashtag = "Hashtag"
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ func (suite *ExtractAttachmentsTestSuite) TestExtractAttachmentMissingURL() {
|
||||
d1.SetActivityStreamsUrl(streams.NewActivityStreamsUrlProperty())
|
||||
|
||||
attachment, err := ap.ExtractAttachment(d1)
|
||||
suite.EqualError(err, "could not extract url")
|
||||
suite.EqualError(err, "ExtractAttachment: error extracting attachment URL: ExtractURL: no valid URL property found")
|
||||
suite.Nil(attachment)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user