mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Preparation for the possibility to globally block contacts
This commit is contained in:
parent
cc9074bed5
commit
c6dbbe21b4
3 changed files with 54 additions and 1 deletions
|
@ -761,10 +761,20 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
|||
$arr["author-id"] = get_contact($arr["author-link"], 0);
|
||||
}
|
||||
|
||||
if (blockedContact($arr["author-id"])) {
|
||||
logger('Contact '.$arr["author-id"].' is blocked, item '.$arr["uri"].' will not be stored');
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($arr["owner-id"] == 0) {
|
||||
$arr["owner-id"] = get_contact($arr["owner-link"], 0);
|
||||
}
|
||||
|
||||
if (blockedContact($arr["owner-id"])) {
|
||||
logger('Contact '.$arr["owner-id"].' is blocked, item '.$arr["uri"].' will not be stored');
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($arr['guid'] != "") {
|
||||
// Checking if there is already an item with the same guid
|
||||
logger('checking for an item for user '.$arr['uid'].' on network '.$arr['network'].' with the guid '.$arr['guid'], LOGGER_DEBUG);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue