From 7a332ead4143f7efe77736c545f00b1e5f4331db Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 11 Jun 2023 00:02:05 -0400 Subject: [PATCH] oops, owner field doesn't exist. only check attributedto for collections. --- activity.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/activity.go b/activity.go index 8450608..7b5b7c1 100644 --- a/activity.go +++ b/activity.go @@ -1714,6 +1714,7 @@ func investigate(name string) (*SomeThing, error) { func somethingabout(obj junk.Junk) (*SomeThing, error) { info := new(SomeThing) t, _ := obj.GetString("type") + isowned := false switch t { case "Person": fallthrough @@ -1726,6 +1727,7 @@ func somethingabout(obj junk.Junk) (*SomeThing, error) { case "Service": info.What = SomeActor case "OrderedCollection": + isowned = true fallthrough case "Collection": info.What = SomeCollection @@ -1737,8 +1739,7 @@ func somethingabout(obj junk.Junk) (*SomeThing, error) { if info.Name == "" { info.Name, _ = obj.GetString("name") } - info.Owner, _ = obj.GetString("owner") - if info.Owner == "" { + if isowned { info.Owner, _ = obj.GetString("attributedTo") } if info.Owner == "" {