handle attachment url that's a map

This commit is contained in:
Ted Unangst 2020-05-14 17:45:11 -04:00
parent 249105f131
commit 3b792bbcea
1 changed files with 6 additions and 1 deletions

View File

@ -723,7 +723,12 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
} }
at, _ := att.GetString("type") at, _ := att.GetString("type")
mt, _ := att.GetString("mediaType") 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") name, _ := att.GetString("name")
desc, _ := att.GetString("summary") desc, _ := att.GetString("summary")
if desc == "" { if desc == "" {