mirror of
https://github.com/friendica/friendica
synced 2025-04-27 20:30:13 +00:00
Don't accept ignored author via relay
This commit is contained in:
parent
9cd9ad647d
commit
9b1918c650
4 changed files with 19 additions and 4 deletions
|
@ -24,6 +24,7 @@ namespace Friendica\Protocol;
|
|||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Search;
|
||||
|
||||
/**
|
||||
|
@ -36,10 +37,11 @@ class Relay
|
|||
*
|
||||
* @param array $tags
|
||||
* @param string $body
|
||||
* @param int $authorid
|
||||
* @param string $url
|
||||
* @return boolean "true" is the post is wanted by the system
|
||||
*/
|
||||
public static function isSolicitedPost(array $tags, string $body, string $url, string $network = '')
|
||||
public static function isSolicitedPost(array $tags, string $body, int $authorid, string $url, string $network = '')
|
||||
{
|
||||
$config = DI::config();
|
||||
|
||||
|
@ -55,6 +57,16 @@ class Relay
|
|||
return false;
|
||||
}
|
||||
|
||||
if (Contact::isBlocked($authorid)) {
|
||||
Logger::info('Author is blocked - rejected', ['author' => $authorid, 'network' => $network, 'url' => $url]);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Contact::isHidden($authorid)) {
|
||||
Logger::info('Author is hidden - rejected', ['author' => $authorid, 'network' => $network, 'url' => $url]);
|
||||
return false;
|
||||
}
|
||||
|
||||
$systemTags = [];
|
||||
$userTags = [];
|
||||
$denyTags = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue