Use send_at date for scheduled campaigns in RSS feed. Closes #1149.

This commit is contained in:
Kailash Nadh 2023-01-21 12:43:30 +05:30
parent 72d22d40ef
commit 62d3782d04

View file

@ -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,
})
}