X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=src%2FWorker%2FPubSubPublish.php;h=2656cef24b7af5b07adfcd97a5873537b445e6c5;hb=4fb24d4ebba267309dc76f3107bd7cc891af6c17;hp=3af206e80d86ae2335013759d85a740877cccc22;hpb=c2e29f26851565bcc292b7ac299e677feac590bc;p=friendica.git diff --git a/src/Worker/PubSubPublish.php b/src/Worker/PubSubPublish.php index 3af206e80d..2656cef24b 100644 --- a/src/Worker/PubSubPublish.php +++ b/src/Worker/PubSubPublish.php @@ -26,7 +26,7 @@ class PubSubPublish { foreach ($r as $rr) { logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG); - Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), + Worker::add(['priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true], 'PubSubPublish', (int)$rr["id"]); } } @@ -60,11 +60,11 @@ class PubSubPublish { $hmac_sig = hash_hmac("sha1", $params, $rr['secret']); - $headers = array("Content-type: application/atom+xml", + $headers = ["Content-type: application/atom+xml", sprintf("Link: <%s>;rel=hub,<%s>;rel=self", System::baseUrl().'/pubsubhubbub/'.$rr['nickname'], $rr['topic']), - "X-Hub-Signature: sha1=".$hmac_sig); + "X-Hub-Signature: sha1=".$hmac_sig]; logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG);