]> git.mxchange.org Git - friendica.git/commitdiff
improvements
authornupplaPhil <admin+github@philipp.info>
Fri, 31 Jan 2020 23:27:46 +0000 (00:27 +0100)
committernupplaPhil <admin+github@philipp.info>
Fri, 31 Jan 2020 23:27:46 +0000 (00:27 +0100)
src/Model/FSuggest.php
src/Module/FriendSuggest.php
src/Worker/Notifier.php

index e7b8df7e272afe957e5a720c7849332b9586f9ac..a910eb30c252402ed39ed0965f4e4f862e923093 100644 (file)
@@ -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
index b2a76300a443587909ef277691b5c8eec1118e48..dcb93ee7eb982f8768677e886f6612141dce5849 100644 (file)
@@ -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,
index d611c54c96649fb02b928599e27b266d0bc1a0eb..85098d1deba46c711335d0c8c308d507c5609753 100644 (file)
@@ -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) {