hide the danger zone for muggles

This commit is contained in:
Ted Unangst 2019-09-30 22:28:53 -04:00
parent 1b0a01df8f
commit c6b4cb22f7
3 changed files with 14 additions and 8 deletions

6
fun.go
View File

@ -71,6 +71,11 @@ func reverbolate(userid int64, honks []*Honk) {
h.Precis = unpucker(h.Precis)
h.Noise = unpucker(h.Noise)
h.Open = "open"
if userid == -1 {
if h.Precis != "" {
h.Open = ""
}
} else {
if badword := unsee(zilences, h.Precis, h.Noise, h.Donks); badword != "" {
if h.Precis == "" {
h.Precis = badword
@ -79,6 +84,7 @@ func reverbolate(userid int64, honks []*Honk) {
} else if h.Precis == "unspecified horror" {
h.Precis = ""
}
}
h.HTPrecis, _ = filt.String(h.Precis)
h.HTML, _ = filt.String(h.Noise)
emuxifier := func(e string) string {

View File

@ -39,7 +39,7 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
</header>
<p>
<details class="noise" {{ .Open }} >
<summary>{{ .HTPrecis }}</summary>
<summary>{{ .HTPrecis }}<p></summary>
<p>{{ .HTPrecis }}
<p>{{ .HTML }}
{{ with .Place }}