From 2cca5a2be8c6b962030be97bb30a8b8227970bbb Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 4 Jan 2023 11:29:40 -0500 Subject: [PATCH] try to fix up page content for lemmy --- activity.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activity.go b/activity.go index c6396e8..96ba1cc 100644 --- a/activity.go +++ b/activity.go @@ -541,6 +541,7 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { 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 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { case "Article": fallthrough case "Page": + waspage = true obj = item what = "honk" case "Event": @@ -736,6 +738,10 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { if sens, _ := obj["sensitive"].(bool); sens && precis == "" { precis = "unspecified horror" } + if waspage { + content += fmt.Sprintf(`

%s`, url, url) + url = xid + } rid, ok = obj.GetString("inReplyTo") if !ok { if robj, ok := obj.GetMap("inReplyTo"); ok {