From 3b792bbcea5f4ed323f07ece6aba56f7e3dfd459 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 14 May 2020 17:45:11 -0400 Subject: [PATCH] handle attachment url that's a map --- activity.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/activity.go b/activity.go index bfbb415..6800910 100644 --- a/activity.go +++ b/activity.go @@ -723,7 +723,12 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { } at, _ := att.GetString("type") mt, _ := att.GetString("mediaType") - u, _ := att.GetString("url") + u, ok := att.GetString("url") + if !ok { + if uu, ok := att.GetMap("url"); ok { + u, _ = uu.GetString("href") + } + } name, _ := att.GetString("name") desc, _ := att.GetString("summary") if desc == "" {