fix(rss): fix NPE when published date and updated date are both empty

This commit is contained in:
junkfood 2024-03-14 13:46:47 +08:00
parent fab99b27a1
commit 441368695c
No known key found for this signature in database
GPG Key ID: 2EA5B648DB112A34
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class RssHelper @Inject constructor(
id = accountId.spacerDollar(UUID.randomUUID().toString()),
accountId = accountId,
feedId = feed.id,
date = (syndEntry.publishedDate ?: syndEntry.updatedDate).takeIf { !it.isFuture(preDate) } ?: preDate,
date = (syndEntry.publishedDate ?: syndEntry.updatedDate)?.takeIf { !it.isFuture(preDate) } ?: preDate,
title = syndEntry.title.decodeHTML() ?: feed.name,
author = syndEntry.author,
rawDescription = (content ?: desc) ?: "",