From ad6eb15eac2297d3ad058a587ad39ce2957ee637 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 15 Jan 2019 22:36:01 +0100 Subject: fix legacy zot dreport not passing the is_storable check --- Zotlabs/Lib/DReport.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Lib/DReport.php') diff --git a/Zotlabs/Lib/DReport.php b/Zotlabs/Lib/DReport.php index 21b320cac..2cda7ce5d 100644 --- a/Zotlabs/Lib/DReport.php +++ b/Zotlabs/Lib/DReport.php @@ -93,11 +93,16 @@ class DReport { if(! $c) return false; + // legacy zot recipients add a space and their name to the xchan. remove it if true. - // is the recipient one of our connections, or do we want to store every report? + $legacy_recipient = strpos($dr['recipient'], ' '); + if($legacy_recipient !== false) + $rxchan = substr($dr['recipient'], 0 , $legacy_recipient); + else + $rxchan = $dr['recipient']; + // is the recipient one of our connections, or do we want to store every report? - $rxchan = $dr['recipient']; $pcf = get_pconfig($c[0]['channel_id'],'system','dreport_store_all'); if($pcf) return true; -- cgit v1.2.3