archive
/
nntpchan
Archived
1
0
Fork 0

get rootiest post

This commit is contained in:
Jeff Becker 2020-03-07 08:27:45 -05:00
parent 2f5f84da4b
commit ff8c3e915a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 7 additions and 3 deletions

View File

@ -1240,10 +1240,14 @@ func (self *nntpConnection) handleLine(daemon *NNTPDaemon, code int, line string
log.Println(self.name, "got reply to", reference, "but we don't have it")
go daemon.askForArticle(reference)
} else {
h := daemon.store.GetMIMEHeader(reference)
if strings.Trim(h.Get("References"), " ") == "" {
hdr.Set("References", getMessageID(h))
// get rootiest post
ref := reference
var h textproto.MIMEHeader
for ref != "" {
h = daemon.store.GetMIMEHeader(ref)
ref = strings.Trim(h.Get("References"), " ")
}
hdr.Set("References", getMessageID(h))
}
} else if reference != "" {
// bad message id