X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDFRN.php;h=4d2744498787125673215aafccc542f3ca58f7ab;hb=c41aaf8a17405e4e11366fec14519994612744b1;hp=d20b8949b89aaae37baae0b584f4e1fb18d64ad9;hpb=aeef4960a1191d62c4cbdd6cc0e67d1c19ae9b84;p=friendica.git diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index d20b8949b8..4d27444987 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -51,6 +51,7 @@ use Friendica\Util\Crypto; use Friendica\Util\DateTimeFormat; use Friendica\Util\Images; use Friendica\Util\Network; +use Friendica\Util\Proxy; use Friendica\Util\Strings; use Friendica\Util\XML; @@ -618,7 +619,8 @@ class DFRN XML::addElement($doc, $author, "dfrn:handle", $owner["addr"], $attributes); $attributes = ["rel" => "photo", "type" => "image/jpeg", - "media:width" => 300, "media:height" => 300, "href" => $owner['photo']]; + "media:width" => Proxy::PIXEL_SMALL, "media:height" => Proxy::PIXEL_SMALL, + "href" => Contact::getAvatarUrlForId($owner['id'], Proxy::SIZE_SMALL, $owner['updated'])]; if (!$public || !$hide) { $attributes["dfrn:updated"] = $picdate; @@ -899,7 +901,7 @@ class DFRN $entry->setAttribute("xmlns:statusnet", ActivityNamespace::STATUSNET); } - $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); + $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body'] ?? ''); if ($item['private'] == Item::PRIVATE) { $body = Item::fixPrivatePhotos($body, $owner['uid'], $item, $cid); @@ -916,7 +918,7 @@ class DFRN $htmlbody = "[b]" . $item['title'] . "[/b]\n\n" . $htmlbody; } - $htmlbody = BBCode::convert($htmlbody, false, BBCode::OSTATUS); + $htmlbody = BBCode::convertForUriId($item['uri-id'], $htmlbody, BBCode::OSTATUS); } $author = self::addEntryAuthor($doc, "author", $item["author-link"], $item); @@ -1272,7 +1274,7 @@ class DFRN switch ($rino_remote_version) { case 1: - $key = openssl_random_pseudo_bytes(16); + $key = random_bytes(16); $data = self::aesEncrypt($postvars['data'], $key); break;