Block AP delivery

This commit is contained in:
Michael 2018-11-22 22:23:31 +00:00
parent ba1e385f86
commit 2f7b138b09

View file

@ -27,6 +27,7 @@ use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\Diaspora; use Friendica\Protocol\Diaspora;
use Friendica\Core\Cache; use Friendica\Core\Cache;
use Friendica\Util\Map; use Friendica\Util\Map;
use Friendica\Util\Network;
require_once 'include/api.php'; require_once 'include/api.php';
@ -446,6 +447,10 @@ class Transmitter
$contacts = DBA::select('contact', ['url'], $condition); $contacts = DBA::select('contact', ['url'], $condition);
while ($contact = DBA::fetch($contacts)) { while ($contact = DBA::fetch($contacts)) {
if (Network::isUrlBlocked($contact['url'])) {
continue;
}
$profile = APContact::getByURL($contact['url'], false); $profile = APContact::getByURL($contact['url'], false);
if (!empty($profile)) { if (!empty($profile)) {
if (empty($profile['sharedinbox']) || $personal) { if (empty($profile['sharedinbox']) || $personal) {