Archived
1
0

add frontend key based blocking (initial)

This commit is contained in:
Jeff Becker
2018-03-09 16:16:41 -05:00
parent a0ff118323
commit 69f868ecb9
8 changed files with 107 additions and 45 deletions

View File

@@ -89,6 +89,7 @@ type NNTPMessage interface {
OP() bool
// all attachments
Attachments() []NNTPAttachment
FrontendPubkey() string
// all headers
Headers() ArticleHeaders
MIMEHeader() textproto.MIMEHeader
@@ -112,6 +113,10 @@ type NNTPMessage interface {
BodyReader() io.Reader
}
func (self *nntpArticle) FrontendPubkey() string {
return self.headers.Get("X-Frontend-Pubkey", "")
}
type nntpArticle struct {
// mime header
headers ArticleHeaders