save links to the external attachments we don't want to save
Ted Unangst tedu@tedunangst.com
Sun, 28 Apr 2019 22:28:59 -0400
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -22,6 +22,7 @@ "crypto/rsa"
"database/sql" "encoding/json" "fmt" + "html" "image" "io" "log"@@ -538,7 +539,13 @@ donk := savedonk(u, name, mt)
if donk != nil { xonk.Donks = append(xonk.Donks, donk) } + } else { + u = html.EscapeString(u) + content += fmt.Sprintf( + `<p>External attachment: <a href="%s" rel=noreferrer>%s</a>`, u, u) } + } else { + log.Printf("unknown attachment: %s", at) } } tags, _ := jsongetarray(obj, "tag")