From 577eb7068d66fcfec87972573af080d8ebf3bdf4 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 25 Nov 2019 22:14:27 -0500 Subject: [PATCH] add some re: re: re: to replies --- activity.go | 2 +- docs/changelog.txt | 2 ++ web.go | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/activity.go b/activity.go index e07c195..684a208 100644 --- a/activity.go +++ b/activity.go @@ -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 } diff --git a/docs/changelog.txt b/docs/changelog.txt index f1a96a4..f8c83a9 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -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. diff --git a/web.go b/web.go index 8d1c6d0..5f2c52f 100644 --- a/web.go +++ b/web.go @@ -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} }