look for location as property not just tag

This commit is contained in:
Ted Unangst 2019-10-02 21:24:40 -04:00
parent 8d3cc20c94
commit 93e541d2a0
1 changed files with 13 additions and 0 deletions

View File

@ -722,6 +722,19 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
xonk.Time = t xonk.Time = t
} }
} }
loca, ok := obj.GetMap("location")
if ok {
tt, _ := loca.GetString("type")
name, _ := loca.GetString("name")
if tt == "Place" {
p := new(Place)
p.Name = name
p.Latitude, _ = loca["latitude"].(float64)
p.Longitude, _ = loca["longitude"].(float64)
p.Url, _ = loca.GetString("url")
xonk.Place = p
}
}
xonk.Onts = oneofakind(xonk.Onts) xonk.Onts = oneofakind(xonk.Onts)
replyobj, ok := obj.GetMap("replies") replyobj, ok := obj.GetMap("replies")