aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/DReport.php
diff options
context:
space:
mode:
authorManuel Jiménez Friaza <mjfriaza@openmailbox.org>2019-01-20 12:58:27 +0100
committerManuel Jiménez Friaza <mjfriaza@openmailbox.org>2019-01-20 12:58:27 +0100
commit4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0 (patch)
tree49111cffad0616616f4ce76fed9dd6b4fad8e41f /Zotlabs/Lib/DReport.php
parent618d673947dc627dcdac3f9b6da7f31123472b05 (diff)
parent39128c34ccf48cc23ed368cf5bbedd71b5ef75db (diff)
downloadvolse-hubzilla-4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0.tar.gz
volse-hubzilla-4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0.tar.bz2
volse-hubzilla-4e8fc6d19851b6d05a49d5151aaa1f0f1fcfb5c0.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'Zotlabs/Lib/DReport.php')
-rw-r--r--Zotlabs/Lib/DReport.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/Zotlabs/Lib/DReport.php b/Zotlabs/Lib/DReport.php
index 21b320cac..18087e29f 100644
--- a/Zotlabs/Lib/DReport.php
+++ b/Zotlabs/Lib/DReport.php
@@ -87,17 +87,29 @@ 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;
+ // legacy zot recipients add a space and their name to the xchan. remove it if true.
+
+ $legacy_recipient = strpos($dr['recipient'], ' ');
+ if($legacy_recipient !== false) {
+ $legacy_recipient_parts = explode(' ', $dr['recipient'], 2);
+ $rxchan = $legacy_recipient_parts[0];
+ }
+ else {
+ $rxchan = $dr['recipient'];
+ }
- // is the recipient one of our connections, or do we want to store every report?
- $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');
if($pcf)
return true;