better handling of times and places..
This commit is contained in:
parent
d3cbf4c352
commit
d08eab8712
|
@ -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,8 +1047,12 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
|||
t["latitude"] = p.Latitude
|
||||
t["longitude"] = p.Longitude
|
||||
t["url"] = p.Url
|
||||
if h.What == "event" {
|
||||
jo["location"] = t
|
||||
} else {
|
||||
tags = append(tags, t)
|
||||
}
|
||||
}
|
||||
if len(tags) > 0 {
|
||||
jo["tag"] = tags
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue