Archived
1
0

fix error message spam

This commit is contained in:
Jeff 2017-08-03 12:07:12 -04:00
parent d301021122
commit bdabd25867
2 changed files with 12 additions and 5 deletions

View File

@ -128,10 +128,16 @@ func (self *nullHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if len(hash) == 0 {
goto notfound
}
msg, err := self.database.GetMessageIDByHash(hash)
if err != nil {
goto notfound
}
if !self.database.HasArticleLocal(msg.MessageID()) {
goto notfound
}
template.genThread(self.attachments, self.requireCaptcha, msg, self.prefix, self.name, w, self.database, isjson)
return
}

View File

@ -292,11 +292,12 @@ func (self *templateEngine) genThread(allowFiles, requireCaptcha bool, root Arti
newsgroup := root.Newsgroup()
msgid := root.MessageID()
if !db.HasArticleLocal(msgid) {
log.Println("don't have", msgid, "locally, not regenerating")
return
}
/*
if !db.HasArticleLocal(msgid) {
log.Println("don't have", msgid, "locally, not regenerating")
return
}
*/
t, err := db.GetThreadModel(prefix, msgid)
if err == nil {
if json {