]> git.mxchange.org Git - friendica.git/commitdiff
Use self::isBlocked and self:isBlockedByUser in Model\Contact::addRelationship
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 20 May 2019 20:34:17 +0000 (16:34 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 20 May 2019 20:34:17 +0000 (16:34 -0400)
src/Model/Contact.php

index 625c66b199889536f78dc458163d29d117e2481d..a0bbdd10499f43abbf6138d976c7a145e6d66402 100644 (file)
@@ -2144,8 +2144,8 @@ class Contact extends BaseObject
                        return false;
                }
 
-               // Contact is blocked on node-level or user-level
-               if (!empty($pub_contact['blocked']) || !empty($contact['blocked'])) {
+               // Contact is blocked at node-level
+               if (self::isBlocked($datarray['author-id'])) {
                        return false;
                }
 
@@ -2156,6 +2156,11 @@ class Contact extends BaseObject
                $network = $pub_contact['network'];
 
                if (!empty($contact)) {
+            // Contact is blocked at user-level
+                   if (self::isBlockedByUser($contact['id'], $importer['id'])) {
+                       return false;
+            }
+
                        // Make sure that the existing contact isn't archived
                        self::unmarkForArchival($contact);