From f21196df7ca32bc19802db35d098eeae3e87a0d2 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sat, 1 Feb 2020 00:27:46 +0100 Subject: [PATCH] improvements --- src/Model/FSuggest.php | 2 +- src/Module/FriendSuggest.php | 10 +++++++++- src/Worker/Notifier.php | 3 --- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Model/FSuggest.php b/src/Model/FSuggest.php index e7b8df7e2..a910eb30c 100644 --- a/src/Model/FSuggest.php +++ b/src/Model/FSuggest.php @@ -5,7 +5,7 @@ namespace Friendica\Model; use Friendica\BaseModel; /** - * Model for interacting with a friend suggest + * Model for interacting with a friend suggestion * * @property int uid * @property int cid diff --git a/src/Module/FriendSuggest.php b/src/Module/FriendSuggest.php index b2a76300a..dcb93ee7e 100644 --- a/src/Module/FriendSuggest.php +++ b/src/Module/FriendSuggest.php @@ -76,7 +76,15 @@ class FriendSuggest extends BaseModule } $contacts = ContactModel::selectToArray(['id', 'name'], [ - '`uid` = ? AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND NOT `deleted` AND `notify` != "" AND `id` != ? AND `network` = ?', + '`uid` = ? + AND `id` != ? + AND `network` = ? + AND NOT `self` + AND NOT `blocked` + AND NOT `pending` + AND NOT `archive` + AND NOT `deleted` + AND `notify` != ""', local_user(), $cid, Protocol::DFRN, diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index d611c54c9..85098d1de 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -71,9 +71,6 @@ class Notifier } } elseif ($cmd == Delivery::SUGGESTION) { $suggest = DI::fsuggest()->getById($target_id); - if (empty($suggest)) { - return; - } $uid = $suggest->uid; $recipients[] = $suggest->cid; } elseif ($cmd == Delivery::REMOVAL) {