From 01bb982f2b844fff246611d17acb14b9c24ec126 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Wed, 27 Sep 2023 08:07:14 -0600 Subject: refine NNTP Subject header use Don't prepend it to the message if this is a followup post. There's no need to put "Re: previous message subject" into every followup post. --- iris/backend.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iris') diff --git a/iris/backend.go b/iris/backend.go index 7b1c058..fae5322 100644 --- a/iris/backend.go +++ b/iris/backend.go @@ -249,12 +249,14 @@ func msgToIris(article *nntp.Article) (*irisMsg, error) { var msg irisMsg msg.Data.Author = irisAuthor(article.Header.Get("From")) msg.Data.Timestamp = postTime - msg.Data.Message = irisBody(article.Header.Get("Subject"), string(body)) refs := article.Header.Get("References") if refs != "" { spl := strings.SplitN(refs, " ", 2) ref := fromMsgID(spl[0]) msg.Data.Parent = &ref + msg.Data.Message = string(body) + } else { + msg.Data.Message = irisBody(article.Header.Get("Subject"), string(body)) } hash, err := msg.calcHash() -- cgit v1.2.3