aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-04-28 18:20:40 -0700
committerzotlabs <mike@macgirvin.com>2019-04-28 18:20:40 -0700
commit96412544434fdcf06971afdccb19e9e8dd3ea607 (patch)
treef304aaabb1331d1e644619cad5f30e0d193674d1 /Zotlabs
parent95871fe13c3a9515d82510997a734bf7e8945bad (diff)
downloadvolse-hubzilla-96412544434fdcf06971afdccb19e9e8dd3ea607.tar.gz
volse-hubzilla-96412544434fdcf06971afdccb19e9e8dd3ea607.tar.bz2
volse-hubzilla-96412544434fdcf06971afdccb19e9e8dd3ea607.zip
event attachments still weren't being delivered to zot6
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 5c3002837..9df7db169 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -195,6 +195,13 @@ class Activity {
if(! $ev['nofinish']) {
$y['endTime'] = (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtend'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtend'],'Y-m-d\\TH:i:s-00:00'));
}
+
+ // copy attachments from the passed object - these are already formatted for ActivityStreams
+
+ if($x['attachment']) {
+ $y['attachment'] = $x['attachment'];
+ }
+
if($actor) {
return $y;
}
@@ -404,7 +411,7 @@ class Activity {
$ret = [];
if($item['attach']) {
- $atts = json_decode($item['attach'],true);
+ $atts = ((is_array($item['attach'])) ? $item['attach'] : json_decode($item['attach'],true));
if($atts) {
foreach($atts as $att) {
if(strpos($att['type'],'image')) {
@@ -416,7 +423,7 @@ class Activity {
}
}
}
-
+
return $ret;
}