From 770fdb2b7d095d763d43ffe8d2f6b5b2182673cb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 12 Nov 2018 16:08:22 -0800 Subject: dreport updates --- include/zot.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index 49fc89e33..756a5bde6 100644 --- a/include/zot.php +++ b/include/zot.php @@ -8,6 +8,8 @@ * */ +use Zotlabs\Lib\DReport; + require_once('include/crypto.php'); require_once('include/items.php'); require_once('include/queue_fn.php'); @@ -1120,7 +1122,7 @@ function zot_process_response($hub, $arr, $outq) { foreach($x['delivery_report'] as $xx) { call_hooks('dreport_process',$xx); - if(is_array($xx) && array_key_exists('message_id',$xx) && delivery_report_is_storable($xx)) { + if(is_array($xx) && array_key_exists('message_id',$xx) && DReport::is_storable($xx)) { q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ", dbesc($xx['message_id']), dbesc($xx['location']), @@ -1748,7 +1750,7 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $ } $channel = $r[0]; - $DR->addto_recipient($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); + $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); /* blacklisted channels get a permission denied, no special message to tip them off */ @@ -2297,7 +2299,7 @@ function process_mail_delivery($sender, $arr, $deliveries) { } $channel = $r[0]; - $DR->addto_recipient($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); + $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); /* blacklisted channels get a permission denied, no special message to tip them off */ @@ -3987,7 +3989,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { if(array_key_exists('item',$arr) && is_array($arr['item'][0])) { $DR = new Zotlabs\Lib\DReport(z_root(),$d['hash'],$d['hash'],$arr['item'][0]['message_id'],'channel sync processed'); - $DR->addto_recipient($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); + $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); } else $DR = new Zotlabs\Lib\DReport(z_root(),$d['hash'],$d['hash'],'sync packet','channel sync delivered'); -- cgit v1.2.3