XML::addElement($doc, $entry, "id", $item["uri"]);
XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8'));
- $body = OStatus::formatPicturePost($item['body']);
+ $body = OStatus::formatPicturePost($item['body'], $item['uri-id']);
$body = BBCode::convert($body, false, BBCode::OSTATUS);
* @return string The cleaned body
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function formatPicturePost($body)
+ public static function formatPicturePost($body, $uriid)
{
$siteinfo = BBCode::getAttachedData($body);
}
// Is it a remote picture? Then make a smaller preview here
- $preview = ProxyUtils::proxifyUrl($preview, ProxyUtils::SIZE_SMALL);
+ $preview = Post\Link::getByLink($uriid, $preview, ProxyUtils::SIZE_SMALL);
// Is it a local picture? Then make it smaller here
$preview = str_replace(["-0.jpg", "-0.png"], ["-2.jpg", "-2.png"], $preview);
XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8'));
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
- $body = self::formatPicturePost($body);
+ $body = self::formatPicturePost($body, $item['uri-id']);
if (!empty($item['title'])) {
$body = "[b]".$item['title']."[/b]\n\n".$body;