let's try to stick with AP/AS defined locations

master
Ted Unangst 5 years ago
parent ef507154d5
commit 5139949a5a

@ -1061,21 +1061,25 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
t["icon"] = i
tags = append(tags, t)
}
if len(tags) > 0 {
jo["tag"] = tags
}
if p := h.Place; p != nil {
t := junk.New()
t["type"] = "Place"
t["name"] = p.Name
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 p.Name != "" {
t["name"] = p.Name
}
}
if len(tags) > 0 {
jo["tag"] = tags
if p.Latitude != 0 {
t["latitude"] = p.Latitude
}
if p.Longitude != 0 {
t["longitude"] = p.Longitude
}
if p.Url != "" {
t["url"] = p.Url
}
jo["location"] = t
}
if t := h.Time; t != nil {
jo["startTime"] = t.StartTime.Format(time.RFC3339)

Loading…
Cancel
Save