only first class honks in rss

This commit is contained in:
Ted Unangst 2019-08-23 20:35:58 -04:00
parent 9a1b98e402
commit a9f0fad050
2 changed files with 8 additions and 1 deletions

4
fun.go
View File

@ -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 {

View File

@ -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(`<p><a href="%s">Attachment: %s</a>`,
@ -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,
}