X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FActivityPub%2FTransmitter.php;h=7da110f6716dfd5fb6a2e284e727e19d85e551b8;hb=5f5298125530857f009ca236139853954511a94e;hp=02dc7ff544ef8c636f52dde0ab84cca0efdcff74;hpb=7560939d75c6bdc19f4179e0644373ddce0bf915;p=friendica.git diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 02dc7ff544..7da110f671 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -1639,6 +1639,8 @@ class Transmitter $real_quote = false; + $item = Post\Media::addHTMLAttachmentToItem($item); + $body = $item['body']; if ($type == 'Note') { @@ -1675,7 +1677,7 @@ class Transmitter if ($type == 'Page') { // When we transmit "Page" posts we have to remove the attachment. // The attachment contains the link that we already transmit in the "url" field. - $body = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", '', $body); + $body = BBCode::removeAttachment($body); } $body = BBCode::setMentionsToNicknames($body); @@ -1707,7 +1709,7 @@ class Transmitter $richbody = DI::contentItem()->addSharedPost($item, $richbody); } } - $richbody = BBCode::removeAttachment($richbody); + $richbody = BBCode::replaceAttachment($richbody); $data['contentMap'][$language] = BBCode::convertForUriId($item['uri-id'], $richbody, BBCode::EXTERNAL); }