Don't deliver to blocked domains

This commit is contained in:
Michael 2018-11-22 22:09:22 +00:00
parent fb0140a62b
commit ba1e385f86

View file

@ -19,6 +19,7 @@ use Friendica\Protocol\DFRN;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\Email;
use Friendica\Util\Strings;
use Friendica\Util\Network;
require_once 'include/items.php';
@ -158,6 +159,10 @@ class Delivery extends BaseObject
return;
}
if (Network::isUrlBlocked($contact['url'])) {
return;
}
// Transmit via Diaspora if the thread had started as Diaspora post
// This is done since the uri wouldn't match (Diaspora doesn't transmit it)
if (isset($parent) && ($parent['network'] == Protocol::DIASPORA) && ($contact['network'] == Protocol::DFRN)) {