Use self::isBlocked and self:isBlockedByUser in Model\Contact::addRelationship
This commit is contained in:
parent
7bbaf0757f
commit
14a78807d7
|
@ -2144,8 +2144,8 @@ class Contact extends BaseObject
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contact is blocked on node-level or user-level
|
// Contact is blocked at node-level
|
||||||
if (!empty($pub_contact['blocked']) || !empty($contact['blocked'])) {
|
if (self::isBlocked($datarray['author-id'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2156,6 +2156,11 @@ class Contact extends BaseObject
|
||||||
$network = $pub_contact['network'];
|
$network = $pub_contact['network'];
|
||||||
|
|
||||||
if (!empty($contact)) {
|
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
|
// Make sure that the existing contact isn't archived
|
||||||
self::unmarkForArchival($contact);
|
self::unmarkForArchival($contact);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue