all repos — honk @ 49ce536a6408912f24a3b6dc03c88f9cf5b5db5b

my fork of honk

try to fix up page content for lemmy
Ted Unangst tedu@tedunangst.com
Wed, 04 Jan 2023 11:29:40 -0500
commit

49ce536a6408912f24a3b6dc03c88f9cf5b5db5b

parent

54c907dedf094b75a1f7979115d64d122800c1ed

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M activity.goactivity.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 {