From 8abe53d879ef188a5c1cc394894ce211fcfa9f92 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 20 Apr 2023 21:46:25 +0200 Subject: Improve markAsReadUponGone (#5315) * Improve markAsReadUponGone Fix case when the uptream feed has zero article, then old articles would never be automatically marked as read with the "mark as read when gone" policy, which was only based on the timestamp of new articles from the uptream feed. * Fix typo * Simplify request Needs to be re-tested with SQLite + MySQL * While waiting to check syntax on all database types * Fix multiple errors In the case of WebSub, and in the case of invalid GUIDs --- app/Controllers/feedController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 15bf0128b..76cd3ad83 100644 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -531,7 +531,10 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $feedDAO->updateLastUpdate($feed->id(), false, $mtime); $needFeedCacheRefresh |= ($feed->keepMaxUnread() != false); - $needFeedCacheRefresh |= ($feed->markAsReadUponGone() != false); + if (!$simplePiePush) { + // Do not call for WebSub events, as we do not know the list of articles still on the upstream feed. + $needFeedCacheRefresh |= ($feed->markAsReadUponGone() != false); + } if ($needFeedCacheRefresh) { $feedDAO->updateCachedValues($feed->id()); } -- cgit v1.2.3