sometimes the orderedcollection only has items, not ordereditems. sigh.
This commit is contained in:
parent
aa91c7d96c
commit
0aa072baf2
17
activity.go
17
activity.go
|
@ -295,18 +295,23 @@ func gimmexonks(user *WhatAbout, outbox string) {
|
||||||
origin := originate(outbox)
|
origin := originate(outbox)
|
||||||
if t == "OrderedCollection" {
|
if t == "OrderedCollection" {
|
||||||
items, _ := j.GetArray("orderedItems")
|
items, _ := j.GetArray("orderedItems")
|
||||||
|
if items == nil {
|
||||||
|
items, _ = j.GetArray("items")
|
||||||
|
}
|
||||||
if items == nil {
|
if items == nil {
|
||||||
obj, ok := j.GetMap("first")
|
obj, ok := j.GetMap("first")
|
||||||
if ok {
|
if ok {
|
||||||
items, _ = obj.GetArray("orderedItems")
|
items, _ = obj.GetArray("orderedItems")
|
||||||
} else {
|
} else {
|
||||||
page1, _ := j.GetString("first")
|
page1, ok := j.GetString("first")
|
||||||
j, err = GetJunk(page1)
|
if ok {
|
||||||
if err != nil {
|
j, err = GetJunk(page1)
|
||||||
log.Printf("error gettings page1: %s", err)
|
if err != nil {
|
||||||
return
|
log.Printf("error gettings page1: %s", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
items, _ = j.GetArray("orderedItems")
|
||||||
}
|
}
|
||||||
items, _ = j.GetArray("orderedItems")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(items) > 20 {
|
if len(items) > 20 {
|
||||||
|
|
Loading…
Reference in New Issue