diff --git a/src/Model/FSuggest.php b/src/Model/FSuggest.php index e7b8df7e27..a910eb30c2 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 b2a76300a4..dcb93ee7eb 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 d611c54c96..85098d1deb 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) {