Merge pull request #7268 from annando/issue-5983
Issue 5983: Central check for blocked and ignored contacts added
This commit is contained in:
commit
da114445c9
1 changed files with 10 additions and 0 deletions
|
@ -1453,6 +1453,11 @@ class Item extends BaseObject
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!empty($uid) && Contact::isBlockedByUser($item['author-link'], $uid)) {
|
||||
Logger::notice('Author is blocked by user', ['author-link' => $item['author-link'], 'uid' => $uid, 'item-uri' => $item['uri']]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
$default = ['url' => $item['owner-link'], 'name' => $item['owner-name'],
|
||||
'photo' => $item['owner-avatar'], 'network' => $item['network']];
|
||||
|
||||
|
@ -1468,6 +1473,11 @@ class Item extends BaseObject
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!empty($uid) && Contact::isBlockedByUser($item['owner-link'], $uid)) {
|
||||
Logger::notice('Owner is blocked by user', ['owner-link' => $item['owner-link'], 'uid' => $uid, 'item-uri' => $item['uri']]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($item['network'] == Protocol::PHANTOM) {
|
||||
$item['network'] = Protocol::DFRN;
|
||||
Logger::notice('Missing network, setting to {network}.', [
|
||||
|
|
Loading…
Reference in a new issue