aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/DReport.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-01-16 10:02:13 +0100
committerMario Vavti <mario@mariovavti.com>2019-01-16 10:02:13 +0100
commita1ac507a94b52c58c497f22be2b55d8d7b515cca (patch)
tree42ee61de576190d7cfea28c7489f7c289e09e185 /Zotlabs/Lib/DReport.php
parentad6eb15eac2297d3ad058a587ad39ce2957ee637 (diff)
downloadvolse-hubzilla-a1ac507a94b52c58c497f22be2b55d8d7b515cca.tar.gz
volse-hubzilla-a1ac507a94b52c58c497f22be2b55d8d7b515cca.tar.bz2
volse-hubzilla-a1ac507a94b52c58c497f22be2b55d8d7b515cca.zip
change logic for consistency
Diffstat (limited to 'Zotlabs/Lib/DReport.php')
-rw-r--r--Zotlabs/Lib/DReport.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Lib/DReport.php b/Zotlabs/Lib/DReport.php
index 2cda7ce5d..ef1ce2678 100644
--- a/Zotlabs/Lib/DReport.php
+++ b/Zotlabs/Lib/DReport.php
@@ -96,10 +96,13 @@ class DReport {
// 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)
- $rxchan = substr($dr['recipient'], 0 , $legacy_recipient);
- else
+ 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?