aboutsummaryrefslogtreecommitdiffstats
path: root/include/deliver.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/deliver.php')
-rw-r--r--include/deliver.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/deliver.php b/include/deliver.php
index 471ea580d..b0d15e1ef 100644
--- a/include/deliver.php
+++ b/include/deliver.php
@@ -1,4 +1,4 @@
-<?php
+<?php /** @file */
require_once('include/cli_startup.php');
require_once('include/zot.php');
@@ -23,11 +23,15 @@ function deliver_run($argv, $argc) {
if($r[0]['outq_posturl'] === z_root() . '/post') {
// local delivery
// we should probably batch these and save a few delivery processes
- $msg = array('body' => json_encode(array('pickup' => array(array('notify' => json_decode($r[0]['outq_notify'],true),'message' => json_decode($r[0]['outq_msg'],true))))));
- zot_import($msg);
- $r = q("delete from outq where outq_hash = '%s' limit 1",
- dbesc($argv[$x])
- );
+ // If there is no outq_msg, this is a refresh_all message which does not require local handling
+ if($r[0]['outq_msg']) {
+ $msg = array('body' => json_encode(array('pickup' => array(array('notify' => json_decode($r[0]['outq_notify'],true),'message' => json_decode($r[0]['outq_msg'],true))))));
+
+ zot_import($msg,z_root());
+ $r = q("delete from outq where outq_hash = '%s' limit 1",
+ dbesc($argv[$x])
+ );
+ }
}
else {
$result = zot_zot($r[0]['outq_posturl'],$r[0]['outq_notify']);