From 4ee177e1572b899127a03ecad46369945d303198 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 26 Oct 2019 17:35:44 -0400 Subject: [PATCH] handle importing collection of strings --- activity.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/activity.go b/activity.go index 417cb77..68bc726 100644 --- a/activity.go +++ b/activity.go @@ -358,10 +358,22 @@ func gimmexonks(user *WhatAbout, outbox string) { } 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)) + } } } }