diff --git a/activity.go b/activity.go index 37ef878..237602b 100644 --- a/activity.go +++ b/activity.go @@ -967,12 +967,7 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { procatt(att) } } - tags, _ := obj.GetArray("tag") - for _, tagi := range tags { - tag, ok := tagi.(junk.Junk) - if !ok { - continue - } + proctag := func(tag junk.Junk) { tt, _ := tag.GetString("type") name, _ := tag.GetString("name") desc, _ := tag.GetString("summary") @@ -1017,6 +1012,18 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { mentions = append(mentions, m) } } + tags, _ := obj.GetArray("tag") + for _, tagi := range tags { + tag, ok := tagi.(junk.Junk) + if !ok { + continue + } + proctag(tag) + } + tag, ok := obj.GetMap("tag") + if ok { + proctag(tag) + } if starttime, ok := obj.GetString("startTime"); ok { if start, err := time.Parse(time.RFC3339, starttime); err == nil { t := new(Time)