Ensure that pokes are always send only via DFRN

This commit is contained in:
Michael 2019-06-06 04:26:02 +00:00
parent 3b0fabcdb7
commit 44a49a8d7d
6 changed files with 23 additions and 11 deletions

View file

@ -37,6 +37,7 @@ use Friendica\Util\Map;
use Friendica\Util\Network;
use Friendica\Util\Strings;
use Friendica\Util\XML;
use Friendica\Worker\Delivery;
use SimpleXMLElement;
/**
@ -2148,9 +2149,9 @@ class Diaspora
continue;
}
if ($comment['verb'] == ACTIVITY_POST) {
$cmd = $comment['self'] ? 'comment-new' : 'comment-import';
$cmd = $comment['self'] ? Delivery::COMMENT : 'comment-import';
} else {
$cmd = $comment['self'] ? 'like' : 'comment-import';
$cmd = $comment['self'] ? Delivery::ACTIVITY : 'activity-import';
}
Logger::log("Send ".$cmd." for item ".$comment['id']." to contact ".$contact_id, Logger::DEBUG);
Worker::add(PRIORITY_HIGH, 'Delivery', $cmd, $comment['id'], $contact_id);