use Friendica\Util\DateTimeFormat;
use Friendica\Util\Images;
use Friendica\Util\Network;
+use Friendica\Util\Proxy;
use Friendica\Util\Strings;
use Friendica\Util\XML;
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;
$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);
switch ($rino_remote_version) {
case 1:
- $key = openssl_random_pseudo_bytes(16);
+ $key = random_bytes(16);
$data = self::aesEncrypt($postvars['data'], $key);
break;