WIP: Fix RSS issues (#720)

* Add id field to RSS feed

* Add published field to RSS feed
This commit is contained in:
Wilfried OLLIVIER 2020-01-14 01:30:32 +01:00 committed by Violet White
parent f3c05dae62
commit 23049b638c

View file

@ -139,6 +139,10 @@ pub fn post_to_atom(post: Post, conn: &Connection) -> Entry {
}) })
.collect::<Vec<Person>>(), .collect::<Vec<Person>>(),
) )
// Using RFC 4287 format, see https://tools.ietf.org/html/rfc4287#section-3.3 for dates
// eg: 2003-12-13T18:30:02Z (Z is here because there is no timezone support with the NaiveDateTime crate)
.published(post.creation_date.format("%Y-%m-%dT%H:%M:%SZ").to_string())
.id(post.id.to_string())
.links(vec![LinkBuilder::default() .links(vec![LinkBuilder::default()
.href(post.ap_url) .href(post.ap_url)
.build() .build()