Skip to content

Commit

Permalink
rss item content
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub committed Sep 15, 2024
1 parent 102636c commit cb3b230
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controller/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ impl TryFrom<rss::Item> for SourceItem {
return Err(AppError::InvalidFeedLink);
};

let content = rss.description.unwrap_or_default();
let content = rss.content.unwrap_or_else(|| {
rss.description
.unwrap_or_else(|| rss.itunes_ext.and_then(|e| e.summary).unwrap_or_default())
});
let title = if let Some(title) = rss.title {
title
} else if content.len() > 100 {
Expand Down

0 comments on commit cb3b230

Please sign in to comment.