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:
Jam Balaya
2026-07-07 16:04:32 +09:00
committed by GitHub
parent cb13091b37
commit 310bcb5e90
5 changed files with 43 additions and 1 deletions

View File

@@ -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;
}
}