From 32c2699ce10e1b96d1bb66c6364fad79adfb8d43 Mon Sep 17 00:00:00 2001 From: javi11 Date: Mon, 27 Apr 2026 22:34:17 +0200 Subject: [PATCH] feat(poster): bump nntppool to v4.11.1 and use PostHeaders.Date field Update nntppool from v4.10.1 to v4.11.1 which added a dedicated Date time.Time field to PostHeaders. Use that field directly instead of formatting the date string into Extra["Date"], letting the library handle RFC-compliant formatting internally. --- go.mod | 2 +- go.sum | 2 ++ internal/poster/poster.go | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index d57df2b..c6e8516 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket v1.5.3 - github.com/javi11/nntppool/v4 v4.10.1 + github.com/javi11/nntppool/v4 v4.11.1 github.com/javi11/nxg v0.1.0 github.com/javi11/nzbparser v0.5.4 github.com/javi11/par2go v0.0.7 diff --git a/go.sum b/go.sum index 0d40023..e7fceed 100644 --- a/go.sum +++ b/go.sum @@ -347,6 +347,8 @@ github.com/jackmordaunt/icns v1.0.0 h1:RYSxplerf/l/DUd09AHtITwckkv/mqjVv4DjYdPmA github.com/jackmordaunt/icns v1.0.0/go.mod h1:7TTQVEuGzVVfOPPlLNHJIkzA6CoV7aH1Dv9dW351oOo= github.com/javi11/nntppool/v4 v4.10.1 h1:NHoRniTnCRgpt/niljsWjA3gP5pYtNwxaqbLdr0Bcew= github.com/javi11/nntppool/v4 v4.10.1/go.mod h1:+UtisJLDFLXBSkW9R6uCRgdp3lS/+6pLAk7L+Wt6LMw= +github.com/javi11/nntppool/v4 v4.11.1 h1:581fZSPv+RyIKY2hI0GB0eZrm1rCbAp+HRP5nIp7kd0= +github.com/javi11/nntppool/v4 v4.11.1/go.mod h1:+UtisJLDFLXBSkW9R6uCRgdp3lS/+6pLAk7L+Wt6LMw= github.com/javi11/nxg v0.1.0 h1:CTThldYlaVIPIhpkrMw0HcTD0NLrW1uYMoDILjjEOtM= github.com/javi11/nxg v0.1.0/go.mod h1:+GvYpp+y1oq+qBOWxFMvfTjtin/0zCeomWfjiPkiu8A= github.com/javi11/nzbparser v0.5.4 h1:0aYyORZipp7iX8eNpT/efnzCeVO+9C0sE2HWCGc/JaI= diff --git a/internal/poster/poster.go b/internal/poster/poster.go index a310868..0ce2a5f 100644 --- a/internal/poster/poster.go +++ b/internal/poster/poster.go @@ -1060,12 +1060,10 @@ func (p *poster) postArticleWithBody(ctx context.Context, art *article.Article, Subject: art.Subject, Newsgroups: art.Groups, MessageID: fmt.Sprintf("<%s>", art.MessageID), + Date: art.Date.UTC(), Extra: make(map[string][]string), } - // Add Date header - headers.Extra["Date"] = []string{art.Date.UTC().Format(time.RFC1123Z)} - // Add custom headers if art.CustomHeaders != nil { for k, v := range art.CustomHeaders {