Merge branch 'friendica:2022.12-rc' into new_image_presentation

This commit is contained in:
MarekBenjamin 2022-12-11 22:25:47 +01:00 committed by GitHub
commit e4702ed464
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 6 deletions

View file

@ -200,7 +200,10 @@ class Status extends BaseFactory
} }
$item['body'] = $this->contentItem->addSharedPost($item); $item['body'] = $this->contentItem->addSharedPost($item);
if (!is_null($item['raw-body'])) {
$item['raw-body'] = $this->contentItem->addSharedPost($item, $item['raw-body']); $item['raw-body'] = $this->contentItem->addSharedPost($item, $item['raw-body']);
}
if ($is_reshare) { if ($is_reshare) {
$reshare = $this->createFromUriId($uriId, $uid, false)->toArray(); $reshare = $this->createFromUriId($uriId, $uid, false)->toArray();

View file

@ -2282,7 +2282,12 @@ class Item
return; return;
} }
if (!DBA::exists('contact', ['id' => $item['contact-id'], 'remote_self' => Contact::MIRROR_NATIVE_RESHARE])) { $cdata = Contact::getPublicAndUserContactID($item['author-id'], $item['uid']);
if (empty($cdata['user']) || ($cdata['user'] != $item['contact-id'])) {
return;
}
if (!DBA::exists('contact', ['id' => $cdata['user'], 'remote_self' => Contact::MIRROR_NATIVE_RESHARE])) {
return; return;
} }

View file

@ -247,7 +247,10 @@ class Images
if ($data) { if ($data) {
$image = new Image($img_str); $image = new Image($img_str);
if ($image->isValid()) {
$data['blurhash'] = $image->getBlurHash(); $data['blurhash'] = $image->getBlurHash();
}
$data['size'] = $filesize; $data['size'] = $filesize;
} }