ItemContent is replaced

This commit is contained in:
Michael 2021-01-30 23:14:05 +00:00
parent 749dac6e38
commit 61d95f5302
3 changed files with 6 additions and 8 deletions

View file

@ -9,13 +9,13 @@
require 'addon/buffer/bufferapp.php';
use Friendica\App;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\ItemContent;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
@ -342,7 +342,7 @@ function buffer_send(App $a, array &$b)
$item = $b;
$post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode);
$post = Plaintext::getPost($item, $limit, $includedlinks, $htmlmode);
Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG);
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures

View file

@ -52,7 +52,6 @@ use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Group;
use Friendica\Model\Item;
use Friendica\Model\ItemContent;
use Friendica\Model\Photo;
use Friendica\Model\Post;
use Friendica\Model\User;
@ -578,7 +577,7 @@ function statusnet_post_hook(App $a, &$b)
DI::pConfig()->set($b['uid'], 'statusnet', 'max_char', $max_char);
$tempfile = "";
$msgarr = ItemContent::getPlaintextPost($b, $max_char, true, 7);
$msgarr = Plaintext::getPost($b, $max_char, true, 7);
$msg = $msgarr["text"];
if (($msg == "") && isset($msgarr["title"]))
@ -729,7 +728,7 @@ function statusnet_prepare_body(App $a, &$b)
}
}
$msgarr = ItemContent::getPlaintextPost($item, $max_char, true, 7);
$msgarr = Plaintext::getPost($item, $max_char, true, 7);
$msg = $msgarr["text"];
if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {

View file

@ -81,7 +81,6 @@ use Friendica\Model\Contact;
use Friendica\Model\Conversation;
use Friendica\Model\Group;
use Friendica\Model\Item;
use Friendica\Model\ItemContent;
use Friendica\Model\ItemURI;
use Friendica\Model\Post;
use Friendica\Model\Tag;
@ -666,7 +665,7 @@ function twitter_post_hook(App $a, array &$b)
$b['body'] = twitter_update_mentions($b['body']);
$msgarr = ItemContent::getPlaintextPost($b, $max_char, true, BBCode::TWITTER);
$msgarr = Plaintext::getPost($b, $max_char, true, BBCode::TWITTER);
Logger::info('Got plaintext', ['id' => $b['id'], 'message' => $msgarr]);
$msg = $msgarr["text"];
@ -896,7 +895,7 @@ function twitter_prepare_body(App $a, array &$b)
}
}
$msgarr = ItemContent::getPlaintextPost($item, $max_char, true, BBCode::TWITTER);
$msgarr = Plaintext::getPost($item, $max_char, true, BBCode::TWITTER);
$msg = $msgarr["text"];
if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) {