From a9f0fad050c35d05151aef952f3df316e8b51b14 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 23 Aug 2019 20:35:58 -0400 Subject: [PATCH] only first class honks in rss --- fun.go | 4 ++++ honk.go | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fun.go b/fun.go index a891aca..f6d0525 100644 --- a/fun.go +++ b/fun.go @@ -448,6 +448,10 @@ func keepitquiet(aud []string) bool { return true } +func firstclass(honk *Honk) bool { + return honk.Audience[0] == thewholeworld +} + func oneofakind(a []string) []string { var x []string for n, s := range a { diff --git a/honk.go b/honk.go index 95709cc..6969c6a 100644 --- a/honk.go +++ b/honk.go @@ -258,6 +258,9 @@ func showrss(w http.ResponseWriter, r *http.Request) { } var modtime time.Time for _, honk := range honks { + if !firstclass(honk) { + continue + } desc := string(honk.HTML) for _, d := range honk.Donks { desc += fmt.Sprintf(`

Attachment: %s`, @@ -922,7 +925,7 @@ func savebonk(w http.ResponseWriter, r *http.Request) { Date: dt, Donks: xonk.Donks, Convoy: xonk.Convoy, - Audience: []string{oonker, thewholeworld}, + Audience: []string{thewholeworld, oonker}, Public: true, }