aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-04-29 11:58:59 +0200
committerMario <mario@mariovavti.com>2019-04-29 11:58:59 +0200
commit674215e9e6632ac22a1b87f9996f0323f5949d94 (patch)
tree152c71c2b99c337ec3ca35d9644a6fe4ec9ff5a4 /Zotlabs/Lib/Activity.php
parentdce6a5763d925e6bf70c6a293be079a05269ce36 (diff)
parentd89d6e8a01ef9af0d300c192367445c385e0252b (diff)
downloadvolse-hubzilla-674215e9e6632ac22a1b87f9996f0323f5949d94.tar.gz
volse-hubzilla-674215e9e6632ac22a1b87f9996f0323f5949d94.tar.bz2
volse-hubzilla-674215e9e6632ac22a1b87f9996f0323f5949d94.zip
Merge branch 'dev' into 'dev'
Add jot videos inline and with poster if possible See merge request hubzilla/core!1613
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-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;
}