handle importing collection of strings
Ted Unangst tedu@tedunangst.com
Sat, 26 Oct 2019 17:35:44 -0400
1 files changed,
14 insertions(+),
2 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -358,10 +358,22 @@ items[i], items[j] = items[j], items[i]
} for _, item := range items { obj, ok := item.(junk.Junk) - if !ok { + if ok { + xonksaver(user, obj, origin) continue } - xonksaver(user, obj, origin) + xid, ok := item.(string) + if ok { + if !needxonkid(user, xid) { + continue + } + obj, err = GetJunk(xid) + if err != nil { + log.Printf("error getting item: %s", err) + continue + } + xonksaver(user, obj, originate(xid)) + } } } }