use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\PortableContact;
use Friendica\Protocol\Salmon;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\PortableContact;
use Friendica\Protocol\Salmon;
foreach ($r as $q_item) {
logger('Call queue for id ' . $q_item['id']);
Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "Queue", (int) $q_item['id']);
foreach ($r as $q_item) {
logger('Call queue for id ' . $q_item['id']);
Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "Queue", (int) $q_item['id']);
- $q_item = dba::selectFirst('queue', [], ['id' => $queue_id]);
- if (!DBM::is_result($q_item)) {
+ $q_item = DBA::selectFirst('queue', [], ['id' => $queue_id]);
+ if (!DBA::isResult($q_item)) {
- $contact = dba::selectFirst('contact', [], ['id' => $q_item['cid']]);
- if (!DBM::is_result($contact)) {
+ $contact = DBA::selectFirst('contact', [], ['id' => $q_item['cid']]);
+ if (!DBA::isResult($contact)) {
logger("Check server " . $server . " (" . $contact["network"] . ")");
$vital = PortableContact::checkServer($server, $contact["network"], true);
logger("Check server " . $server . " (" . $contact["network"] . ")");
$vital = PortableContact::checkServer($server, $contact["network"], true);
- $user = dba::selectFirst('user', [], ['uid' => $contact['uid']]);
- if (!DBM::is_result($user)) {
+ $user = DBA::selectFirst('user', [], ['uid' => $contact['uid']]);
+ if (!DBA::isResult($user)) {
QueueModel::removeItem($q_item['id']);
return;
}
$data = $q_item['content'];
$public = $q_item['batch'];
QueueModel::removeItem($q_item['id']);
return;
}
$data = $q_item['content'];
$public = $q_item['batch'];
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>');
$deliver_status = DFRN::deliver($owner, $contact, $data);
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>');
$deliver_status = DFRN::deliver($owner, $contact, $data);
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>');
$deliver_status = Salmon::slapper($owner, $contact['notify'], $data);
if ($deliver_status == -1) {
QueueModel::updateTime($q_item['id']);
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>');
$deliver_status = Salmon::slapper($owner, $contact['notify'], $data);
if ($deliver_status == -1) {
QueueModel::updateTime($q_item['id']);
logger('queue: diaspora_delivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>');
$deliver_status = Diaspora::transmit($owner, $contact, $data, $public, true, 'Queue:' . $q_item['id'], true);
logger('queue: diaspora_delivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>');
$deliver_status = Diaspora::transmit($owner, $contact, $data, $public, true, 'Queue:' . $q_item['id'], true);