ActivityPub: Rudimentary support for videos
This commit is contained in:
parent
db0b848ae3
commit
37ad4a7d22
|
@ -211,6 +211,11 @@ class Processor
|
||||||
$item['title'] = HTML::toBBCode($activity['name']);
|
$item['title'] = HTML::toBBCode($activity['name']);
|
||||||
$item['content-warning'] = HTML::toBBCode($activity['summary']);
|
$item['content-warning'] = HTML::toBBCode($activity['summary']);
|
||||||
$item['body'] = self::convertMentions(HTML::toBBCode($activity['content']));
|
$item['body'] = self::convertMentions(HTML::toBBCode($activity['content']));
|
||||||
|
|
||||||
|
if (($activity['object_type'] == 'as:Video') && !empty($activity['alternate-url'])) {
|
||||||
|
$item['body'] .= "\n[video]" . $activity['alternate-url'] . '[/video]';
|
||||||
|
}
|
||||||
|
|
||||||
$item['location'] = $activity['location'];
|
$item['location'] = $activity['location'];
|
||||||
|
|
||||||
if (!empty($item['latitude']) && !empty($item['longitude'])) {
|
if (!empty($item['latitude']) && !empty($item['longitude'])) {
|
||||||
|
|
|
@ -698,10 +698,10 @@ class Receiver
|
||||||
|
|
||||||
// Special treatment for Hubzilla links
|
// Special treatment for Hubzilla links
|
||||||
if (is_array($object_data['alternate-url'])) {
|
if (is_array($object_data['alternate-url'])) {
|
||||||
if (!empty($object['as:url'])) {
|
$object_data['alternate-url'] = JsonLD::fetchElement($object_data['alternate-url'], 'as:href');
|
||||||
|
|
||||||
|
if (!is_string($object_data['alternate-url'])) {
|
||||||
$object_data['alternate-url'] = JsonLD::fetchElement($object['as:url'], 'as:href');
|
$object_data['alternate-url'] = JsonLD::fetchElement($object['as:url'], 'as:href');
|
||||||
} else {
|
|
||||||
$object_data['alternate-url'] = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user