aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-25 15:43:13 +0000
committerMario <mario@mariovavti.com>2021-02-25 15:43:13 +0000
commit36c9f9abff0d9d4c52d3307bb563d6fb5067ac7b (patch)
tree1aab8961f183e93a45ed13657d0e3588d89a60c5 /include/feedutils.php
parent8295ccdda75e2eefba0d377aaab7301f1c0760a2 (diff)
parent65892ba5554c9dd19873cba9281c90d3a2b6d733 (diff)
downloadvolse-hubzilla-36c9f9abff0d9d4c52d3307bb563d6fb5067ac7b.tar.gz
volse-hubzilla-36c9f9abff0d9d4c52d3307bb563d6fb5067ac7b.tar.bz2
volse-hubzilla-36c9f9abff0d9d4c52d3307bb563d6fb5067ac7b.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
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 );
}
}