handle attachment url that's a map
Ted Unangst tedu@tedunangst.com
Thu, 14 May 2020 17:45:11 -0400
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -723,7 +723,12 @@ return
} 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 == "" {