Merge branch 'friendica:2022.12-rc' into new_image_presentation
This commit is contained in:
commit
e4702ed464
4 changed files with 17 additions and 6 deletions
|
@ -165,7 +165,7 @@ class Cron
|
|||
Logger::info('Removing failed deliveries', ['inbox' => $delivery['inbox'], 'failed' => $delivery['failed']]);
|
||||
Post\Delivery::removeFailed($delivery['inbox']);
|
||||
}
|
||||
|
||||
|
||||
if ($delivery['failed'] == 0) {
|
||||
$result = ActivityPub\Delivery::deliver($delivery['inbox']);
|
||||
Logger::info('Directly deliver inbox', ['inbox' => $delivery['inbox'], 'result' => $result['success']]);
|
||||
|
|
|
@ -199,8 +199,11 @@ class Status extends BaseFactory
|
|||
}
|
||||
}
|
||||
|
||||
$item['body'] = $this->contentItem->addSharedPost($item);
|
||||
$item['raw-body'] = $this->contentItem->addSharedPost($item, $item['raw-body']);
|
||||
$item['body'] = $this->contentItem->addSharedPost($item);
|
||||
|
||||
if (!is_null($item['raw-body'])) {
|
||||
$item['raw-body'] = $this->contentItem->addSharedPost($item, $item['raw-body']);
|
||||
}
|
||||
|
||||
if ($is_reshare) {
|
||||
$reshare = $this->createFromUriId($uriId, $uid, false)->toArray();
|
||||
|
|
|
@ -2282,7 +2282,12 @@ class Item
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -247,8 +247,11 @@ class Images
|
|||
if ($data) {
|
||||
$image = new Image($img_str);
|
||||
|
||||
$data['blurhash'] = $image->getBlurHash();
|
||||
$data['size'] = $filesize;
|
||||
if ($image->isValid()) {
|
||||
$data['blurhash'] = $image->getBlurHash();
|
||||
}
|
||||
|
||||
$data['size'] = $filesize;
|
||||
}
|
||||
|
||||
return is_array($data) ? $data : [];
|
||||
|
|
Loading…
Reference in a new issue