X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDiaspora.php;h=16f934eccf3cbef0d475be9de2228ec16163644b;hb=75e450bc1540a3547f6d337dc61de7cfae7a4c83;hp=4b00ead002c1d4309bbb2226e658e0e1f14d3103;hpb=688e056ad116ff9fcd6c3df815e6e7856c943f70;p=friendica.git diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 4b00ead002..16f934eccf 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -22,7 +22,6 @@ namespace Friendica\Protocol; use Friendica\Content\Feature; -use Friendica\Content\PageInfo; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\Markdown; use Friendica\Core\Cache\Duration; @@ -1067,7 +1066,7 @@ class Diaspora * 'key' => The public key of the author * @throws \Exception */ - private static function message($guid, $server, $level = 0) + public static function message($guid, $server, $level = 0) { if ($level > 5) { return false; @@ -2303,9 +2302,6 @@ class Diaspora $item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]); - // Add OEmbed and other information to the body - $item["body"] = PageInfo::searchAndAppendToBody($item["body"], false, true); - return $item; } else { return $item; @@ -2489,7 +2485,6 @@ class Diaspora Tag::storeFromBody($datarray['uri-id'], $datarray["body"]); - Post\Media::copy($original_item['uri-id'], $datarray['uri-id']); $datarray["app"] = $original_item["app"]; $datarray["plink"] = self::plink($author, $guid); @@ -2733,8 +2728,6 @@ class Diaspora if ($data->photo) { foreach ($data->photo as $photo) { self::storePhotoAsMedia($datarray['uri-id'], $photo); - $body = "[img]".XML::unescape($photo->remote_photo_path). - XML::unescape($photo->remote_photo_name)."[/img]\n".$body; } $datarray["object-type"] = Activity\ObjectType::IMAGE; @@ -2742,11 +2735,6 @@ class Diaspora } else { $datarray["object-type"] = Activity\ObjectType::NOTE; $datarray["post-type"] = Item::PT_NOTE; - - // Add OEmbed and other information to the body - if (!self::isHubzilla($contact["url"])) { - $body = PageInfo::searchAndAppendToBody($body, false, true); - } } /// @todo enable support for polls @@ -3418,7 +3406,7 @@ class Diaspora $type = "reshare"; } else { $title = $item["title"]; - $body = $item["body"]; + $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); // Fetch the title from an attached link - if there is one if (empty($item["title"]) && DI::pConfig()->get($owner['uid'], 'system', 'attach_link_title')) { @@ -3632,7 +3620,7 @@ class Diaspora $thread_parent_item = Post::selectFirst(['guid', 'author-id', 'author-link', 'gravity'], ['uri' => $item['thr-parent'], 'uid' => $item['uid']]); } - $body = $item["body"]; + $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); // The replied to autor mention is prepended for clarity if: // - Item replied isn't yours