require_once 'addon/diaspora/Diaspora_Connection.php';
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
$r = q("SELECT `addr` FROM `contact` WHERE `self` AND `uid` = %d", intval(local_user()));
if (DBM::is_result($r)) {
- $status = sprintf(L10n::t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. "), $r[0]['addr']);
+ $status = L10n::t("Please remember: You can always be reached from Diaspora with your Friendica handle %s. ", $r[0]['addr']);
$status .= L10n::t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
- $status .= sprintf(L10n::t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'), $r[0]['addr']);
+ $status .= L10n::t('However, it is preferred that you tell your Diaspora contacts the new handle %s instead.', $r[0]['addr']);
}
$aspects = false;
$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);
} while ($oldbody != $body);
// convert to markdown
- $body = bb2diaspora($body, false, true);
+ $body = BBCode::toMarkdown($body);
// Adding the title
if(strlen($title))
$a->contact = $r[0]["id"];
$s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $body]);
-
+
Queue::add($a->contact, NETWORK_DIASPORA2, $s);
notice(L10n::t('Diaspora post failed. Queued for retry.').EOL);
}