fix delivery report for zot6 connections
This commit is contained in:
parent
eda7c5369c
commit
07f6465872
@ -87,9 +87,11 @@ class DReport {
|
||||
|
||||
// Is the sender one of our channels?
|
||||
|
||||
$c = q("select channel_id from channel where channel_hash = '%s' limit 1",
|
||||
$c = q("select channel_id from channel where channel_hash = '%s' or channel_portable_id = '%s'limit 1",
|
||||
dbesc($dr['sender']),
|
||||
dbesc($dr['sender'])
|
||||
);
|
||||
|
||||
if(! $c)
|
||||
return false;
|
||||
|
||||
@ -104,6 +106,8 @@ class DReport {
|
||||
$rxchan = $dr['recipient'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
// is the recipient one of our connections, or do we want to store every report?
|
||||
|
||||
$pcf = get_pconfig($c[0]['channel_id'],'system','dreport_store_all');
|
||||
|
@ -995,6 +995,7 @@ logger('4');
|
||||
}
|
||||
|
||||
if(is_array($x) && array_key_exists('delivery_report',$x) && is_array($x['delivery_report'])) {
|
||||
|
||||
foreach($x['delivery_report'] as $xx) {
|
||||
call_hooks('dreport_process',$xx);
|
||||
if(is_array($xx) && array_key_exists('message_id',$xx) && DReport::is_storable($xx)) {
|
||||
|
@ -80,8 +80,9 @@ class Dreport extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
$r = q("select * from dreport where dreport_xchan = '%s' and dreport_mid = '%s'",
|
||||
$r = q("select * from dreport where (dreport_xchan = '%s' or dreport_xchan = '%s') and dreport_mid = '%s'",
|
||||
dbesc($channel['channel_hash']),
|
||||
dbesc($channel['channel_portable_id']),
|
||||
dbesc($mid)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user