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 return true
} }
func firstclass(honk *Honk) bool {
return honk.Audience[0] == thewholeworld
}
func oneofakind(a []string) []string { func oneofakind(a []string) []string {
var x []string var x []string
for n, s := range a { for n, s := range a {

View File

@ -258,6 +258,9 @@ func showrss(w http.ResponseWriter, r *http.Request) {
} }
var modtime time.Time var modtime time.Time
for _, honk := range honks { for _, honk := range honks {
if !firstclass(honk) {
continue
}
desc := string(honk.HTML) desc := string(honk.HTML)
for _, d := range honk.Donks { for _, d := range honk.Donks {
desc += fmt.Sprintf(`<p><a href="%s">Attachment: %s</a>`, desc += fmt.Sprintf(`<p><a href="%s">Attachment: %s</a>`,
@ -922,7 +925,7 @@ func savebonk(w http.ResponseWriter, r *http.Request) {
Date: dt, Date: dt,
Donks: xonk.Donks, Donks: xonk.Donks,
Convoy: xonk.Convoy, Convoy: xonk.Convoy,
Audience: []string{oonker, thewholeworld}, Audience: []string{thewholeworld, oonker},
Public: true, Public: true,
} }