mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
parse the correct kind of attachment
This commit is contained in:
parent
1e7d61af9c
commit
4b1fd36e86
1 changed files with 6 additions and 8 deletions
|
@ -4685,14 +4685,12 @@ class Activity
|
||||||
$item['body'] .= "\n\n" . '[audio]' . $a['href'] . '[/audio]';
|
$item['body'] .= "\n\n" . '[audio]' . $a['href'] . '[/audio]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (array_key_exists('type', $a) && stripos($a['type'], 'link') !== false) {
|
if (!isset($a['type']) && ActivityStreams::is_url($a['href']) && !strpos($item['body'], $a['href'])) {
|
||||||
if (ActivityStreams::is_url($a['href']) && !strpos($item['body'], $a['href'])) {
|
$li = Url::get(z_root() . '/linkinfo?binurl=' . bin2hex($a['href']));
|
||||||
$li = Url::get(z_root() . '/linkinfo?binurl=' . bin2hex($a['href']));
|
if ($li['success'] && $li['body']) {
|
||||||
if ($li['success'] && $li['body']) {
|
$item['body'] .= "\n" . $li['body'];
|
||||||
$item['body'] .= "\n" . $li['body'];
|
} else {
|
||||||
} else {
|
$item['body'] .= "\n\n" . $a['href'];
|
||||||
$item['body'] .= "\n\n" . $a['href'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue