Skip to content

feat(poster): bump nntppool to v4.11.1 and use PostHeaders.Date field#222

Merged
javi11 merged 1 commit into
mainfrom
claude/pensive-agnesi-2eb0ce
Apr 28, 2026
Merged

feat(poster): bump nntppool to v4.11.1 and use PostHeaders.Date field#222
javi11 merged 1 commit into
mainfrom
claude/pensive-agnesi-2eb0ce

Conversation

@javi11
Copy link
Copy Markdown
Owner

@javi11 javi11 commented Apr 27, 2026

Summary

  • Bumps nntppool from v4.10.1 to v4.11.1
  • Moves the article date out of Extra["Date"] (pre-formatted string) and into the new PostHeaders.Date time.Time field introduced in v4.11.1
  • The library now handles RFC-compliant date formatting internally, falling back to time.Now().UTC() if the field is zero

What changed

internal/poster/poster.gopostArticleWithBody:

// Before
headers := nntppool.PostHeaders{ ... }
headers.Extra["Date"] = []string{art.Date.UTC().Format(time.RFC1123Z)}

// After
headers := nntppool.PostHeaders{
    ...
    Date:  art.Date.UTC(),
    ...
}

Reviewer notes

Behaviour is identical — the article date is still applied to every outgoing article. The only difference is that formatting is now delegated to the library, which is the idiomatic way per the v4.11.1 PostHeaders documentation.

Test plan

  • go build ./internal/poster/... — clean
  • go test ./internal/poster/... — all tests pass

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.
@javi11 javi11 merged commit b1e089c into main Apr 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant