aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2019-01-18 06:15:01 +0100
committerM. Dent <dentm42@gmail.com>2019-01-18 06:15:01 +0100
commitbf879ce742d4a1fd77cb6e5de85adfdfc213ac58 (patch)
tree7d50b69884c02c2cedd543e14265f8d27f60fa37
parente89a3b05ece60ecb994e0dd4c2701164cabb0525 (diff)
parent5aa0267936e391e1d1a98de5287546ad5817fb41 (diff)
downloadvolse-hubzilla-bf879ce742d4a1fd77cb6e5de85adfdfc213ac58.tar.gz
volse-hubzilla-bf879ce742d4a1fd77cb6e5de85adfdfc213ac58.tar.bz2
volse-hubzilla-bf879ce742d4a1fd77cb6e5de85adfdfc213ac58.zip
Merge branch 'dreport_fixes' into 'dev'
fix delivery report for zot6 connections See merge request hubzilla/core!1476
-rw-r--r--Zotlabs/Lib/DReport.php6
-rw-r--r--Zotlabs/Lib/Libzot.php1
-rw-r--r--Zotlabs/Module/Dreport.php3
3 files changed, 8 insertions, 2 deletions
diff --git a/Zotlabs/Lib/DReport.php b/Zotlabs/Lib/DReport.php
index ef1ce2678..18087e29f 100644
--- a/Zotlabs/Lib/DReport.php
+++ b/Zotlabs/Lib/DReport.php
@@ -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');
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 268622430..e66c929bf 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -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)) {
diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php
index 16ae7941f..2c125b7a9 100644
--- a/Zotlabs/Module/Dreport.php
+++ b/Zotlabs/Module/Dreport.php
@@ -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)
);