all repos — honk @ 9907dbe8689c53815b2443172ac7f58f65eb2677

my fork of honk

collect the other replies collection too
Ted Unangst tedu@tedunangst.com
Tue, 26 Dec 2023 15:03:07 -0500
commit

9907dbe8689c53815b2443172ac7f58f65eb2677

parent

781652add08870420a3c470bd2e8f85250f2d4c9

1 files changed, 14 insertions(+), 1 deletions(-)

jump to
M activity.goactivity.go

@@ -376,6 +376,15 @@ }

return nil, false }}) +var gettergate = gate.NewLimiter(1) + +func getsomemore(user *WhatAbout, page string) { + time.Sleep(5 * time.Second) + gettergate.Start() + defer gettergate.Finish() + gimmexonks(user, page) +} + func gimmexonks(user *WhatAbout, outbox string) { dlog.Printf("getting outbox: %s", outbox) j, err := GetJunk(user.ID, outbox)

@@ -385,7 +394,7 @@ return

} t, _ := j.GetString("type") origin := originate(outbox) - if t == "OrderedCollection" { + if t == "OrderedCollection" || t == "CollectionPage" { items, _ := j.GetArray("orderedItems") if items == nil { items, _ = j.GetArray("items")

@@ -1058,6 +1067,10 @@ if !ok {

first, ok := replyobj.GetMap("first") if ok { items, _ = first.GetArray("items") + next, _ := first.GetString("next") + if next != "" { + go getsomemore(user, next) + } } } for _, repl := range items {