/**
* @param array $fields
*
- * @return Model\Notify
+ * @return Model\Notify|false
*
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws Exception
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);