aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-21 23:51:04 -0700
committerzotlabs <mike@macgirvin.com>2017-09-21 23:51:04 -0700
commitaef239f4212244997a09c10445072f886c8bf368 (patch)
treef4140e1c57341e187d1b219f3dae41d9688c11e2 /Zotlabs
parent3456c192feeab9495693e2cbdcff16fe99bff932 (diff)
downloadvolse-hubzilla-aef239f4212244997a09c10445072f886c8bf368.tar.gz
volse-hubzilla-aef239f4212244997a09c10445072f886c8bf368.tar.bz2
volse-hubzilla-aef239f4212244997a09c10445072f886c8bf368.zip
delivery report decryption is not needed for local delivery
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Daemon/Deliver.php33
1 files changed, 14 insertions, 19 deletions
diff --git a/Zotlabs/Daemon/Deliver.php b/Zotlabs/Daemon/Deliver.php
index 39c9ffdb1..394a7bf3e 100644
--- a/Zotlabs/Daemon/Deliver.php
+++ b/Zotlabs/Daemon/Deliver.php
@@ -54,29 +54,24 @@ class Deliver {
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])
);