aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-07-05 11:00:26 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-05 11:00:26 +0200
commit1db606bc1b6cf25d9b9c4bef362acdb964ce1e8a (patch)
tree9556fec20e66270f7117850530de01f0f3c36b65 /app/Controllers/feedController.php
parentebf62a4296b8007527325374608de5a7b972d598 (diff)
New extension hook entry_auto_read (#5505)
* New extension hook entry_auto_read For extensions to be notified of articles being automatically marked as read for various reasons * Documentation + entry_auto_unread
Diffstat (limited to 'app/Controllers/feedController.php')
-rw-r--r--app/Controllers/feedController.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 485851948..8c95a5c9c 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -479,8 +479,16 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
//This entry already exists but has been updated
//Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->url(false) .
//', old hash ' . $existingHash . ', new hash ' . $entry->hash());
- $entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy.
$entry->_isFavorite(null); // Do not change favourite state
+ $entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy.
+ if ($mark_updated_article_unread) {
+ Minz_ExtensionManager::callHook('entry_auto_unread', $entry, 'updated_article');
+ }
+
+ $entry->applyFilterActions($titlesAsRead);
+ if ($readWhenSameTitleInFeed > 0) {
+ $titlesAsRead[$entry->title()] = true;
+ }
$entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry);
if (!($entry instanceof FreshRSS_Entry)) {