]> git.mxchange.org Git - friendica-addons.git/blobdiff - diaspora/diaspora.php
Merge pull request #634 from annando/language
[friendica-addons.git] / diaspora / diaspora.php
index 49a9cfc471bca2e57bbd5e9366958fd1b855f8ab..04d3c7eca88d32efd30e5f743987a2402d12ce69 100644 (file)
@@ -9,6 +9,7 @@
 
 require_once 'addon/diaspora/Diaspora_Connection.php';
 
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\Addon;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
@@ -303,10 +304,8 @@ function diaspora_send(&$a,&$b) {
        $aspect = PConfig::get($b['uid'],'diaspora','aspect');
 
        if ($handle && $password) {
-
                logger('diaspora_send: all values seem to be okay', LOGGER_DEBUG);
 
-               require_once('include/bb2diaspora.php');
                $tag_arr = [];
                $tags = '';
                $x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER);
@@ -338,7 +337,7 @@ function diaspora_send(&$a,&$b) {
                 } while ($oldbody != $body);
 
                // convert to markdown
-               $body = bb2diaspora($body);
+               $body = BBCode::toMarkdown($body);
 
                // Adding the title
                if(strlen($title))