From d08eab8712134711f9a536b5295c106e6af87213 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 5 Oct 2019 16:49:56 -0400 Subject: [PATCH] better handling of times and places.. --- activity.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/activity.go b/activity.go index 2cb523f..0206654 100644 --- a/activity.go +++ b/activity.go @@ -751,6 +751,8 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { if err == nil { t := new(Time) t.StartTime = start + endtime, _ := obj.GetString("endTime") + t.EndTime, _ = time.Parse(time.RFC3339, endtime) dura, _ := obj.GetString("duration") if strings.HasPrefix(dura, "PT") { dura = strings.ToLower(dura[2:]) @@ -1045,7 +1047,11 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) { t["latitude"] = p.Latitude t["longitude"] = p.Longitude t["url"] = p.Url - tags = append(tags, t) + if h.What == "event" { + jo["location"] = t + } else { + tags = append(tags, t) + } } if len(tags) > 0 { jo["tag"] = tags