Skip to content

Commit

Permalink
Use send_at date for scheduled campaigns in RSS feed. Closes #1149.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jan 21, 2023
1 parent 72d22d4 commit 62d3782
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/archive.go
Expand Up @@ -62,10 +62,16 @@ func handleGetCampaignArchivesFeed(c echo.Context) error {

out := make([]*feeds.Item, 0, len(camps))
for _, c := range camps {
pubDate := c.CreatedAt.Time

if c.SendAt.Valid {
pubDate = c.SendAt.Time
}

out = append(out, &feeds.Item{
Title: c.Subject,
Link: &feeds.Link{Href: c.URL},
Created: c.CreatedAt.Time,
Created: pubDate,
})
}

Expand Down

0 comments on commit 62d3782

Please sign in to comment.