Skip to content

Commit

Permalink
RSS: Fallback to updated when published date is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Dec 6, 2023
1 parent b185ab1 commit c7c814a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/jasper/component/RssParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ private Ref parseEntry(Ref feed, Feed config, SyndEntry entry, Map<String, Objec
}
var publishMonth = publishDate.substring(2);
ref.setPublished(Instant.parse(publishYear + "-" + publishMonth + "-01T00:00:00.00Z"));
} else if (entry.getUpdatedDate() != null) {
ref.setPublished(entry.getUpdatedDate().toInstant());
}
var comment = isNotBlank(ref.getComment()) ? ref.getComment() : "";
if (config.isScrapeDescription() || config.isScrapeContents()) {
Expand Down

0 comments on commit c7c814a

Please sign in to comment.