aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-02-27 19:47:26 +0000
committerMax Kostikov <max@kostikov.co>2021-02-27 19:47:26 +0000
commit1d899d387e89b67245249204249052bf7b65f5c1 (patch)
tree86b8ed42e016bb9cbfcb5ececbc03585a941a23a /include/feedutils.php
parent5440a65607f3c67cc6ecacbf2d54c5895e5bc212 (diff)
parentfbb1d6aa41d9eb7a27b4a8bc79747ac0797db0c7 (diff)
downloadvolse-hubzilla-1d899d387e89b67245249204249052bf7b65f5c1.tar.gz
volse-hubzilla-1d899d387e89b67245249204249052bf7b65f5c1.tar.bz2
volse-hubzilla-1d899d387e89b67245249204249052bf7b65f5c1.zip
Merge branch 'dev' into 'dev'
Dev sync See merge request kostikov/core!2
Diffstat (limited to 'include/feedutils.php')
-rw-r--r--include/feedutils.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 352b8f038..9cb645ff8 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -722,17 +722,17 @@ function get_atom_elements($feed, $item) {
if(! $type)
$type = 'application/octet-stream';
- if($ostatus_protocol) {
- if((strpos($type,'image') === 0) && (strpos($res['body'], ']' . $link . '[/img]') === false) && (strpos($link,'http') === 0)) {
- $res['body'] .= "\n\n" . '[img]' . $link . '[/img]';
- }
- if((strpos($type,'video') === 0) && (strpos($res['body'], ']' . $link . '[/video]') === false) && (strpos($link,'http') === 0)) {
- $res['body'] .= "\n\n" . '[video]' . $link . '[/video]';
- }
- if((strpos($type,'audio') === 0) && (strpos($res['body'], ']' . $link . '[/audio]') === false) && (strpos($link,'http') === 0)) {
- $res['body'] .= "\n\n" . '[audio]' . $link . '[/audio]';
- }
+ // put media enclosures in bbcode markup
+ if((strpos($type,'image') === 0) && (strpos($res['body'], ']' . $link . '[/img]') === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[img]' . $link . '[/img]';
+ }
+ if((strpos($type,'video') === 0) && (strpos($res['body'], ']' . $link . '[/video]') === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[video]' . $link . '[/video]';
+ }
+ if((strpos($type,'audio') === 0) && (strpos($res['body'], ']' . $link . '[/audio]') === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[audio]' . $link . '[/audio]';
}
+
$res['attach'][] = array('href' => $link, 'length' => $len, 'type' => $type, 'title' => $title );
}
}