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