delivery report decryption is not needed for local delivery
This commit is contained in:
parent
3456c192fe
commit
aef239f421
@ -54,13 +54,8 @@ class Deliver {
|
|||||||
|
|
||||||
if($dresult && is_array($dresult)) {
|
if($dresult && is_array($dresult)) {
|
||||||
|
|
||||||
if(array_key_exists('iv',$dresult)) {
|
// delivery reports for local deliveries do not require encryption
|
||||||
$dresult = json_decode(crypto_unencapsulate($dresult,get_config('system','prvkey')),true);
|
|
||||||
}
|
|
||||||
if(! $dresult) {
|
|
||||||
logger('dreport decryption failure');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
foreach($dresult as $xx) {
|
foreach($dresult as $xx) {
|
||||||
if(is_array($xx) && array_key_exists('message_id',$xx)) {
|
if(is_array($xx) && array_key_exists('message_id',$xx)) {
|
||||||
if(delivery_report_is_storable($xx)) {
|
if(delivery_report_is_storable($xx)) {
|
||||||
@ -76,7 +71,7 @@ class Deliver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
q("delete from dreport where dreport_queue = '%s'",
|
q("delete from dreport where dreport_queue = '%s'",
|
||||||
dbesc($argv[$x])
|
dbesc($argv[$x])
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user