shithub: hell

Download patch

ref: 5281969c530be93e6c28504b53d54c5d813d172b
parent: ab82ee0f8235b207976167b726243c826c49f0e4
author: penny <penny@limitedideas.org>
date: Wed Oct 15 17:10:06 EDT 2025

fix reblog rendering in status ppages

--- a/pages.go
+++ b/pages.go
@@ -160,7 +160,16 @@
 	templater := newStatusTemplateRenderer(formatter)
 	for i := range statuses {
 		formatter.status = statuses[i]
-		line, _ := templater.render("$standard_status")
+		if formatter.status.Reblog != nil {
+			
+		}
+		var plaintext string
+		if formatter.status.Reblog != nil {
+			plaintext = fmt.Sprintf("$standard_reblog")
+		} else {
+			plaintext = fmt.Sprintf("$standard_status")
+		}
+		line, _ := templater.render(plaintext)
 		item := makePageItem(line)
 		itemArray = append(itemArray, item)
 		justIncrementPostref(statusData.hc.ctxref, statuses[i])
--- a/templater.go
+++ b/templater.go
@@ -35,6 +35,7 @@
 	// macro templates
 	template.tempdefs = append(template.tempdefs, []*templateDefs{
 		{key: "standard_status", stringer: &standardStatus{template}},
+		{key: "standard_reblog", stringer: &standardReblog{template}},
 		{key: "status_notif", stringer: &statusNotification{template}},
 		{key: "other_notif", stringer: &otherNotification{template}},
 	}...)
@@ -71,6 +72,16 @@
 
 func (ss *standardStatus) String() string {
 	line, _ := ss.renderRaw("$index $username $content $media_descriptions")
+	return line
+}
+
+// Renders a status line for a reblog
+type standardReblog struct {
+	*templateRenderer
+}
+
+func (ss *standardReblog) String() string {
+	line, _ := ss.renderRaw("$username Reblogged $index $boostuser $boostcontent $boosted_media_descriptions")
 	return line
 }
 
--