FreshRSS / Extensions

A repository containing all the official FreshRSS extensions
GNU Affero General Public License v3.0
375 stars 58 forks source link

$this->registerHook('entry_before_insert', [$this, 'handleBeforeInsert']); Duplicate entries #233

Closed iferencz closed 6 months ago

iferencz commented 6 months ago
$this->registerHook('entry_before_insert', [$this, 'handleBeforeInsert']);

I use this hook to handle new entries, but sometimes the handleBeforeInsert function receives duplicate entries that already exist in the database. Has anyone else encountered this problem? I have return $entry; at the end of the function.Thanks.

Alkarex commented 6 months ago

Hello, This is by design. Updated entries might have to be processed by extensions just like new entries. On the edge branch (soon released in 1.24.0), you can test $entry->isUpdated(), otherwise see https://github.com/FreshRSS/FreshRSS/discussions/5602

iferencz commented 6 months ago

Hello, This is by design. Updated entries might have to be processed by extensions just like new entries. On the edge branch (soon released in 1.24.0), you can test $entry->isUpdated(), otherwise see FreshRSS/FreshRSS#5602

Thanks!