mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-19 19:42:59 -04:00
Add read status hook for entries (#8995)
- Add a new `EntriesRead` / `entries_read` hook for extensions. - Trigger the hook when `markRead()` changes entry read/unread state for explicit entry IDs. - Cover both the default DAO path and the SQLite/PGSQL DAO path. - Add Minz hook tests for the new hook signature and argument passing. ## Why Extensions can already react to favorite/bookmark changes through `EntriesFavorite`. This adds the matching read/unread hook requested in #4051 for extensions that need to collect stats or react to manual read state changes. Closes #4051
This commit is contained in:
@@ -164,6 +164,9 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO {
|
||||
}
|
||||
}
|
||||
$this->pdo->commit();
|
||||
if ($affected > 0) {
|
||||
Minz_ExtensionManager::callHook(Minz_HookType::EntriesRead, [$ids], $is_read);
|
||||
}
|
||||
return $affected;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user