all repos — honk @ fe5af70bef7b1038649045b5bce20403d5298a03

my fork of honk

oops, owner field doesn't exist.
only check attributedto for collections.
Ted Unangst tedu@tedunangst.com
Sun, 11 Jun 2023 00:02:05 -0400
commit

fe5af70bef7b1038649045b5bce20403d5298a03

parent

168554bc68b5943a302e884f18fef5d7d26718c4

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -1714,6 +1714,7 @@

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 @@ fallthrough

case "Service": info.What = SomeActor case "OrderedCollection": + isowned = true fallthrough case "Collection": info.What = SomeCollection

@@ -1737,8 +1739,7 @@ info.Name, _ = obj.GetString("preferredUsername")

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 == "" {