try to fix up page content for lemmy
Ted Unangst tedu@tedunangst.com
Wed, 04 Jan 2023 11:29:40 -0500
1 files changed,
6 insertions(+),
0 deletions(-)
jump to
M
activity.go
→
activity.go
@@ -541,6 +541,7 @@ var err error
var xid, rid, url, convoy string var replies []string var obj junk.Junk + waspage := false switch what { case "Delete": obj, ok = item.GetMap("object")@@ -664,6 +665,7 @@ fallthrough
case "Article": fallthrough case "Page": + waspage = true obj = item what = "honk" case "Event":@@ -735,6 +737,10 @@ precis = html.EscapeString(name)
} if sens, _ := obj["sensitive"].(bool); sens && precis == "" { precis = "unspecified horror" + } + if waspage { + content += fmt.Sprintf(`<p><a href="%s">%s</a>`, url, url) + url = xid } rid, ok = obj.GetString("inReplyTo") if !ok {