diff --git a/data.go b/data.go index 2db1460..542637c 100644 --- a/data.go +++ b/data.go @@ -26,6 +26,10 @@ func (ee EnhancedEvent) IsReply() bool { return nip10.GetImmediateReply(ee.event.Tags) != nil } +func (ee EnhancedEvent) Reply() *nostr.Tag { + return nip10.GetImmediateReply(ee.event.Tags) +} + func (ee EnhancedEvent) Preview() template.HTML { lines := strings.Split(html.EscapeString(ee.event.Content), "\n") var processedLines []string @@ -72,7 +76,12 @@ func (ee EnhancedEvent) RssTitle() string { } func (ee EnhancedEvent) RssContent() string { - content := basicFormatting(html.EscapeString(ee.event.Content), true, false) + content := ee.event.Content + if ee.IsReply() { + nevent, _ := nip19.EncodeEvent(ee.Reply().Value(), ee.relays, ee.event.PubKey) + content = "In reply to nostr:" + nevent + "\n_________________________\n\n" + content + } + content = basicFormatting(html.EscapeString(content), true, false) // content = renderQuotesAsHTML(context.Background(), content, false) content = linkQuotes(content) return content diff --git a/templates/rss.xml b/templates/rss.xml index 3343a70..60a3a81 100644 --- a/templates/rss.xml +++ b/templates/rss.xml @@ -8,12 +8,20 @@ {{if not (eq "" .Npub)}} Nostr notes by {{.Metadata.Name}} https://{{.Host}}/{{.Npub}} - {{.Metadata.Picture}} + + {{.Metadata.Picture}} + https://{{.Host}}/{{.Npub}} + Nostr notes by {{.Metadata.Name}} + {{end}} {{if not (eq "" .RelayHostname)}} Nostr notes on {{.RelayHostname}} https://{{.Host}}/r/{{.RelayHostname}} - {{.Info.Icon}} + + {{.Info.Icon}} + Nostr notes on {{.RelayHostname}} + https://{{.Host}}/r/{{.RelayHostname}} + {{end}} {{range $i, $ee := .LastNotes}}