From 0b1b11ea53ee3fd466eb338ac5ce67e62af87413 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 22 Sep 2015 02:32:04 -0700 Subject: heavy lifting for delivery reports --- include/zot.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index f728d8fb9..942998b98 100644 --- a/include/zot.php +++ b/include/zot.php @@ -971,7 +971,11 @@ function zot_process_response($hub, $arr, $outq) { } } } - + + q("delete from dreport where dreport_queue = '%s' limit 1", + dbesc($outq['outq_hash']) + ); + // update the timestamp for this site q("update site set site_dead = 0, site_update = '%s' where site_url = '%s'", @@ -1575,6 +1579,12 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $ continue; } + if($d['hash'] === $sender['hash']) { + $DR->update('self delivery ignored'); + $result[] = $DR->get(); + continue; + } + $channel = $r[0]; $DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>'); -- cgit v1.2.3