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.
This commit is contained in:
tjpcc 2023-09-27 08:07:14 -06:00
parent ee332003dc
commit 01bb982f2b
1 changed files with 3 additions and 1 deletions

View File

@ -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()