X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=statusnet%2Fstatusnet.php;h=1a8766a33f1ab900ee3f7629646f319de32b5b92;hb=ba96796363ad6777269a966774542b1ea5dcb352;hp=4b36859c1e4574a77d83e0c807d63d28142d7222;hpb=042507e157b2a54e0ef1c12266b88b5a66bbab8d;p=friendica-addons.git diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 4b36859c..1a8766a3 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -46,6 +46,7 @@ require_once 'library/twitteroauth.php'; require_once 'include/enotify.php'; use Friendica\App; +use Friendica\Content\OEmbed; use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Model\GContact; @@ -636,7 +637,7 @@ function statusnet_post_hook(App $a, &$b) $tempfile = ""; require_once "include/plaintext.php"; require_once "include/network.php"; - $msgarr = plaintext($a, $b, $max_char, true, 7); + $msgarr = plaintext($b, $max_char, true, 7); $msg = $msgarr["text"]; if (($msg == "") && isset($msgarr["title"])) @@ -805,7 +806,7 @@ function statusnet_prepare_body(App $a, &$b) } } - $msgarr = plaintext($a, $item, $max_char, true, 7); + $msgarr = plaintext($item, $max_char, true, 7); $msg = $msgarr["text"]; if (isset($msgarr["url"]) && ($msgarr["type"] != "photo")) { @@ -1629,7 +1630,6 @@ function statusnet_complete_conversation(App $a, $uid, $self, $create_user, $nic function statusnet_convertmsg(App $a, $body, $no_tags = false) { - require_once "include/oembed.php"; require_once "include/items.php"; require_once "include/network.php"; @@ -1653,7 +1653,7 @@ function statusnet_convertmsg(App $a, $body, $no_tags = false) logger("statusnet_convertmsg: fetching data for " . $expanded_url, LOGGER_DEBUG); - $oembed_data = oembed_fetch_url($expanded_url, true); + $oembed_data = OEmbed::fetchURL($expanded_url, true); logger("statusnet_convertmsg: fetching data: done", LOGGER_DEBUG);