add some re: re: re: to replies

This commit is contained in:
Ted Unangst 2019-11-25 22:14:27 -05:00
parent c871ba9468
commit 577eb7068d
3 changed files with 9 additions and 1 deletions

View File

@ -1022,7 +1022,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
translate(h, true)
jo["summary"] = html.EscapeString(h.Precis)
jo["content"] = h.Noise
if strings.HasPrefix(h.Precis, "DZ:") {
if h.Precis != "" {
jo["sensitive"] = true
}

View File

@ -2,6 +2,8 @@ changelog
-- next
+ Add some re: re: re: to replies.
+ Set an avatar. If you must.
+ Try a little harder to recover from httpsig failures.

6
web.go
View File

@ -1427,6 +1427,12 @@ func submithonk(w http.ResponseWriter, r *http.Request, isAPI bool) {
}
}
honk.RID = rid
if xonk.Precis != "" && honk.Precis == "" {
honk.Precis = xonk.Precis
if !(strings.HasPrefix(honk.Precis, "DZ:") || strings.HasPrefix(honk.Precis, "re: re: re: ")) {
honk.Precis = "re: " + honk.Precis
}
}
} else {
honk.Audience = []string{thewholeworld}
}