Fix hook registration crash by using string hook names

Minz_HookType enum does not exist in this version of FreshRSS;
registerHook() expects plain strings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-25 20:55:51 -03:00
parent c3f3efbf33
commit ac3b584d66

View File

@@ -21,10 +21,10 @@ final class BlueskyThreadsExtension extends Minz_Extension {
parent::init();
// EntryBeforeInsert stores the initial thread in the DB so API sync
// clients (Fever, GReader, etc.) receive enriched content immediately.
$this->registerHook(Minz_HookType::EntryBeforeInsert, [$this, 'fetchThread']);
$this->registerHook('entry_before_insert', [$this, 'fetchThread']);
// EntryBeforeDisplay re-checks staleness on every web render and writes
// refreshed content back to the DB so API clients also get updates.
$this->registerHook(Minz_HookType::EntryBeforeDisplay, [$this, 'refreshThread']);
$this->registerHook('entry_before_display', [$this, 'refreshThread']);
}
#[\Override]