mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:42:24 -05:00
move to ssb gofed fork (#298)
This commit is contained in:
parent
829a934d23
commit
09ef9e639e
799 changed files with 6458 additions and 2475 deletions
|
|
@ -31,7 +31,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-fed/activity/pub"
|
||||
"github.com/superseriousbusiness/activity/pub"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||
)
|
||||
|
|
@ -671,3 +671,21 @@ func isFollowers(uris []*url.URL, followersURI string) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// ExtractSensitive extracts whether or not an item is 'sensitive'.
|
||||
// If no sensitive property is set on the item at all, or if this property
|
||||
// isn't a boolean, then false will be returned by default.
|
||||
func ExtractSensitive(withSensitive WithSensitive) bool {
|
||||
sensitiveProp := withSensitive.GetActivityStreamsSensitive()
|
||||
if sensitiveProp == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
for iter := sensitiveProp.Begin(); iter != sensitiveProp.End(); iter = iter.Next() {
|
||||
if iter.IsXMLSchemaBoolean() {
|
||||
return iter.Get()
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue