requesting bonks with the old activity name may work better

This commit is contained in:
Ted Unangst 2019-04-23 15:58:13 -04:00
parent af961c701c
commit e28d07968d
1 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ func ReadJunk(r io.Reader) (map[string]interface{}, error) {
} }
var theonetruename = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"` var theonetruename = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
var thefakename = `application/activity+json`
var falsenames = []string{ var falsenames = []string{
`application/ld+json`, `application/ld+json`,
`application/activity+json`, `application/activity+json`,
@ -123,7 +124,7 @@ func GetJunk(url string) (map[string]interface{}, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
at := theonetruename at := thefakename
if strings.Contains(url, ".well-known/webfinger?resource") { if strings.Contains(url, ".well-known/webfinger?resource") {
at = "application/jrd+json" at = "application/jrd+json"
} }