From 067aebd1037da124a3a9c39e8263c1578c8d71fc Mon Sep 17 00:00:00 2001 From: juansc Date: Tue, 2 Apr 2024 02:09:58 -0700 Subject: [PATCH] Fall back on updated time if `published_at` not available (#17) --- src-tauri/src/syndication.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/syndication.rs b/src-tauri/src/syndication.rs index 1e5de98..177efcb 100644 --- a/src-tauri/src/syndication.rs +++ b/src-tauri/src/syndication.rs @@ -57,7 +57,7 @@ pub fn fetch_feed_items(link: &str, proxy: Option<&str>) -> Result> .map(atom_syndication::Content::value) .filter(std::option::Option::is_some) .map(|x| x.unwrap().to_string()), - published_at: x.published().map(|x| x.with_timezone(&Utc).fixed_offset()), + published_at: x.published().or(Some(x.updated())).map(|x| x.with_timezone(&Utc).fixed_offset()), }) .collect()), Feed::RSS(rss) => Ok(rss