From 93e541d2a0512b72de5d299e9bff6d7f6b3455cb Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 2 Oct 2019 21:24:40 -0400 Subject: [PATCH] look for location as property not just tag --- activity.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/activity.go b/activity.go index ba6a1b0..2cb66c9 100644 --- a/activity.go +++ b/activity.go @@ -722,6 +722,19 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { 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) replyobj, ok := obj.GetMap("replies")