From 52a401012195c5cc4bfb4d39b0dda5732c1d5643 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Tue, 28 Jan 2020 01:12:41 +0100 Subject: [PATCH] enotify: empty out fields instead of using "abort" for addons --- src/Repository/Notify.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Repository/Notify.php b/src/Repository/Notify.php index 5f2d9f8a7f..9552eddb9a 100644 --- a/src/Repository/Notify.php +++ b/src/Repository/Notify.php @@ -67,7 +67,7 @@ class Notify extends BaseRepository /** * @param array $fields * - * @return Model\Notify + * @return Model\Notify|false * * @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws Exception @@ -75,17 +75,14 @@ class Notify extends BaseRepository public function insert(array $fields) { $fields['date'] = DateTimeFormat::utcNow(); - $fields['abort'] = false; Hook::callAll('enotify_store', $fields); - if ($fields['abort']) { + if (empty($fields)) { $this->logger->debug('Abort adding notification entry', ['fields' => $fields]); - return null; + return false; } - unset($fields['abort']); - $this->logger->debug('adding notification entry', ['fields' => $fields]); return parent::insert($fields);