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:
parent
ee332003dc
commit
01bb982f2b
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue