mirror of
https://github.com/friendica/friendica
synced 2025-04-26 04:30:11 +00:00
Use different parser modes for Mastodon and Twitter-API
This commit is contained in:
parent
205f19da38
commit
210200d330
8 changed files with 27 additions and 28 deletions
|
@ -65,13 +65,13 @@ class DirectMessage extends BaseFactory
|
|||
if (!empty($text_mode)) {
|
||||
$title = $mail['title'];
|
||||
if ($text_mode == 'html') {
|
||||
$text = BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::API);
|
||||
$text = BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::TWITTER_API);
|
||||
} elseif ($text_mode == 'plain') {
|
||||
$text = HTML::toPlaintext(BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::API), 0);
|
||||
$text = HTML::toPlaintext(BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::TWITTER_API), 0);
|
||||
}
|
||||
} else {
|
||||
$title = '';
|
||||
$text = $mail['title'] . "\n" . HTML::toPlaintext(BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::API), 0);
|
||||
$text = $mail['title'] . "\n" . HTML::toPlaintext(BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::TWITTER_API), 0);
|
||||
}
|
||||
|
||||
$pcid = Contact::getPublicIdByUserId($uid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue