X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=dwpost%2Fdwpost.php;h=56e04f783c2be41e7925a903e093d0cddf58f1b6;hb=2d4ecd5ccf25c844502e2cadbf60f3cad5b33ba7;hp=da35aa0fd5d97b4757edd0b4dbe9a61b36170cb8;hpb=203672cf27fc45e264dd0d6dd507ffc4da837e4d;p=friendica-addons.git diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index da35aa0f..56e04f78 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -14,6 +14,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Database\DBA; use Friendica\DI; +use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Util\DateTimeFormat; use Friendica\Util\XML; @@ -159,6 +160,8 @@ function dwpost_send(App $a, array &$b) return; } + $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']); + /* * dreamwidth post in the LJ user's timezone. * Hopefully the person's Friendica account @@ -180,7 +183,7 @@ function dwpost_send(App $a, array &$b) if ($dw_username && $dw_password && $dw_blog) { $title = $b['title']; - $post = BBCode::convert($b['body']); + $post = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS); $post = XML::escape($post); $tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);