aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-04-28 18:21:41 -0700
committerzotlabs <mike@macgirvin.com>2019-04-28 18:21:41 -0700
commitd89d6e8a01ef9af0d300c192367445c385e0252b (patch)
treef304aaabb1331d1e644619cad5f30e0d193674d1
parent6230dbed2d1c06c41b263af3a24180721c44f3c8 (diff)
parent96412544434fdcf06971afdccb19e9e8dd3ea607 (diff)
downloadvolse-hubzilla-d89d6e8a01ef9af0d300c192367445c385e0252b.tar.gz
volse-hubzilla-d89d6e8a01ef9af0d300c192367445c385e0252b.tar.bz2
volse-hubzilla-d89d6e8a01ef9af0d300c192367445c385e0252b.zip
Merge branch 'dev' of ../hz into dev
-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;
}