handle importing collection of strings

This commit is contained in:
Ted Unangst 2019-10-26 17:35:44 -04:00
parent 077e2570d0
commit 4ee177e157
1 changed files with 14 additions and 2 deletions

View File

@ -358,10 +358,22 @@ func gimmexonks(user *WhatAbout, outbox string) {
} }
for _, item := range items { for _, item := range items {
obj, ok := item.(junk.Junk) obj, ok := item.(junk.Junk)
if !ok { if ok {
xonksaver(user, obj, origin)
continue 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))
}
} }
} }
} }