X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FNotifier.php;h=edb0df33adbbcf0d63968dcb6b5ae1cfc055f61d;hb=885d79495825df15c7e9dc597745ba0e525ec1b0;hp=d69627d111c4bdff45dabd1a09d893262f920810;hpb=c69d60644f46246978a7b52da79e7e58c74e31e6;p=friendica.git diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index d69627d111..edb0df33ad 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -4,6 +4,7 @@ */ namespace Friendica\Worker; +use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; @@ -17,10 +18,7 @@ use Friendica\Protocol\Salmon; use dba; require_once 'include/dba.php'; -require_once 'include/html2plain.php'; -require_once 'include/datetime.php'; require_once 'include/items.php'; -require_once 'include/bbcode.php'; /* * This file was at one time responsible for doing all deliveries, but this caused @@ -67,6 +65,7 @@ class Notifier { $url_recipients = []; $normal_mode = true; + $recipients_relocate = []; if ($cmd === 'mail') { $normal_mode = false; @@ -178,6 +177,10 @@ class Notifier { // fill this in with a single salmon slap if applicable $slap = ''; + $followup = false; + $recipients_followup = []; + $conversants = []; + $sql_extra = ''; if (! ($mail || $fsuggest || $relocate)) { $slap = OStatus::salmon($target_item, $owner); @@ -321,8 +324,6 @@ class Notifier { Worker::add($a->queue['priority'], 'Notifier', 'uplink', $item_id); } - $conversants = []; - foreach ($items as $item) { $recipients[] = $item['contact-id']; $conversants[] = $item['contact-id']; @@ -519,7 +520,7 @@ class Notifier { // except for Diaspora batch jobs // Don't deliver to folks who have already been delivered to - if (($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'],$conversants))) { + if (($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'], $conversants))) { logger('notifier: already delivered id=' . $rr['id']); continue; } @@ -553,10 +554,10 @@ class Notifier { logger('notifier: calling hooks', LOGGER_DEBUG); if ($normal_mode) { - call_hooks('notifier_normal',$target_item); + Addon::forkHooks($a->queue['priority'], 'notifier_normal', $target_item); } - call_hooks('notifier_end',$target_item); + Addon::callHooks('notifier_end',$target_item); return; }