mirror of
https://github.com/knadh/listmonk.git
synced 2025-01-10 16:28:36 +08:00
Use send_at
date for scheduled campaigns in RSS feed. Closes #1149.
This commit is contained in:
parent
72d22d40ef
commit
62d3782d04
1 changed files with 7 additions and 1 deletions
|
@ -62,10 +62,16 @@ func handleGetCampaignArchivesFeed(c echo.Context) error {
|
||||||
|
|
||||||
out := make([]*feeds.Item, 0, len(camps))
|
out := make([]*feeds.Item, 0, len(camps))
|
||||||
for _, c := range camps {
|
for _, c := range camps {
|
||||||
|
pubDate := c.CreatedAt.Time
|
||||||
|
|
||||||
|
if c.SendAt.Valid {
|
||||||
|
pubDate = c.SendAt.Time
|
||||||
|
}
|
||||||
|
|
||||||
out = append(out, &feeds.Item{
|
out = append(out, &feeds.Item{
|
||||||
Title: c.Subject,
|
Title: c.Subject,
|
||||||
Link: &feeds.Link{Href: c.URL},
|
Link: &feeds.Link{Href: c.URL},
|
||||||
Created: c.CreatedAt.Time,
|
Created: pubDate,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue