diff options
author | zotlabs <mike@macgirvin.com> | 2017-09-24 16:59:56 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-09-24 16:59:56 -0700 |
commit | 8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c (patch) | |
tree | 04add36aa35ce8cda58c5594a783737b25346175 /Zotlabs/Daemon/Deliver.php | |
parent | 4d3b0577c9538644ca0eeb2751b285521d2cc86d (diff) | |
parent | 866dc9a9b3ca1cd98fc032afe0aec14ccdb86ba0 (diff) | |
download | volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.tar.gz volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.tar.bz2 volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.zip |
Merge branch 'master' into tagging
Diffstat (limited to 'Zotlabs/Daemon/Deliver.php')
-rw-r--r-- | Zotlabs/Daemon/Deliver.php | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/Zotlabs/Daemon/Deliver.php b/Zotlabs/Daemon/Deliver.php index 7c1ff717f..394a7bf3e 100644 --- a/Zotlabs/Daemon/Deliver.php +++ b/Zotlabs/Daemon/Deliver.php @@ -53,29 +53,25 @@ class Deliver { remove_queue_item($r[0]['outq_hash']); if($dresult && is_array($dresult)) { - if(array_key_exists('iv',$dresult)) { - $dresult = json_decode(crypto_unencapsulate($dresult,get_config('system','prvkey')),true); - } - if(! $dresult) { - logger('dreport decryption failure'); - } - else { - foreach($dresult as $xx) { - if(is_array($xx) && array_key_exists('message_id',$xx)) { - if(delivery_report_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']), - dbesc($xx['recipient']), - dbesc($xx['status']), - dbesc(datetime_convert($xx['date'])), - dbesc($xx['sender']) - ); - } + + // delivery reports for local deliveries do not require encryption + + foreach($dresult as $xx) { + if(is_array($xx) && array_key_exists('message_id',$xx)) { + if(delivery_report_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']), + dbesc($xx['recipient']), + dbesc($xx['status']), + dbesc(datetime_convert($xx['date'])), + dbesc($xx['sender']) + ); } } } } + q("delete from dreport where dreport_queue = '%s'", dbesc($argv[$x]) ); |