aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/DReport.php
diff options
context:
space:
mode:
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;