aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-01-16 16:52:21 -0800
committerzotlabs <mike@macgirvin.com>2019-01-16 16:52:21 -0800
commit7e29bd10b6a59bc9c1700cfb84dbefb6a8930153 (patch)
treeac49731f7ed9a5071bd4fcf76faaa2003204064c /Zotlabs/Lib/Libzot.php
parent20eea2184bc1336efb811c29e3fb49262ae02262 (diff)
parentde8582ec07d125bf1c7f08cc3d695c33aaaf9d85 (diff)
downloadvolse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.gz
volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.bz2
volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 87a5126f4..268622430 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -998,6 +998,15 @@ logger('4');
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)) {
+
+ // legacy recipients add a space and their name to the xchan. split those if true.
+ $legacy_recipient = strpos($xx['recipient'], ' ');
+ if($legacy_recipient !== false) {
+ $legacy_recipient_parts = explode(' ', $xx['recipient'], 2);
+ $xx['recipient'] = $legacy_recipient_parts[0];
+ $xx['name'] = $legacy_recipient_parts[1];
+ }
+
q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_name, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s', '%s','%s','%s','%s','%s' ) ",
dbesc($xx['message_id']),
dbesc($xx['location']),