aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-15 00:04:30 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-15 00:04:30 -0800
commit6f2a5117dc04267f7571314639e19265cfc21dec (patch)
treeb4892f8007551fcdfa0bd38e1419fd312413d1d6 /include/zot.php
parentb13241564b994762e5c1a4747f74acc6cd27adf5 (diff)
downloadvolse-hubzilla-6f2a5117dc04267f7571314639e19265cfc21dec.tar.gz
volse-hubzilla-6f2a5117dc04267f7571314639e19265cfc21dec.tar.bz2
volse-hubzilla-6f2a5117dc04267f7571314639e19265cfc21dec.zip
more queue api
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/include/zot.php b/include/zot.php
index 6655f1c2c..8f8e70159 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -998,6 +998,8 @@ function zot_process_response($hub, $arr, $outq) {
}
}
+ // we have a more descriptive delivery report, so discard the per hub 'queued' report.
+
q("delete from dreport where dreport_queue = '%s' limit 1",
dbesc($outq['outq_hash'])
);
@@ -1012,18 +1014,8 @@ function zot_process_response($hub, $arr, $outq) {
// synchronous message types are handled immediately
// async messages remain in the queue until processed.
- if (intval($outq['outq_async'])) {
- q("update outq set outq_delivered = 1, outq_updated = '%s' where outq_hash = '%s' and outq_channel = %d",
- dbesc(datetime_convert()),
- dbesc($outq['outq_hash']),
- intval($outq['outq_channel'])
- );
- } else {
- q("delete from outq where outq_hash = '%s' and outq_channel = %d",
- dbesc($outq['outq_hash']),
- intval($outq['outq_channel'])
- );
- }
+ if(intval($outq['outq_async']))
+ queue_set_delivered($outq['outq_hash'],$outq['outq_channel']);
logger('zot_process_response: ' . print_r($x,true), LOGGER_DEBUG);
}