} else {
// We'll push to each subscriber that has push > 0,
// i.e. there has been an update (set in notifier.php).
} else {
// We'll push to each subscriber that has push > 0,
// i.e. there has been an update (set in notifier.php).
foreach ($r as $rr) {
logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG);
proc_run(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true),
'include/pubsubpublish.php', (int)$rr["id"]);
foreach ($r as $rr) {
logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG);
proc_run(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true),
'include/pubsubpublish.php', (int)$rr["id"]);
- $params = ostatus::feed($a, $rr['nickname'], $rr['last_update']);
+ $last_update = $rr['last_update'];
+ $params = ostatus::feed($a, $rr['nickname'], $last_update);
+
+ if (!$params) {
+ return;
+ }
+
$hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
$headers = array("Content-type: application/atom+xml",
sprintf("Link: <%s>;rel=hub,<%s>;rel=self",
$hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
$headers = array("Content-type: application/atom+xml",
sprintf("Link: <%s>;rel=hub,<%s>;rel=self",
- // set last_update to "now", and reset push=0
- $date_now = datetime_convert('UTC','UTC','now','Y-m-d H:i:s');
+ // set last_update to the "created" date of the last item, and reset push=0