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:
@@ -21,10 +21,10 @@ final class BlueskyThreadsExtension extends Minz_Extension {
|
|||||||
parent::init();
|
parent::init();
|
||||||
// EntryBeforeInsert stores the initial thread in the DB so API sync
|
// EntryBeforeInsert stores the initial thread in the DB so API sync
|
||||||
// clients (Fever, GReader, etc.) receive enriched content immediately.
|
// 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
|
// EntryBeforeDisplay re-checks staleness on every web render and writes
|
||||||
// refreshed content back to the DB so API clients also get updates.
|
// 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]
|
#[\Override]
|
||||||
|
|||||||
Reference in New Issue
Block a user