Merge branch 'develop' into fix-code-style-for-pr-14688

This commit is contained in:
Art4 2025-01-22 09:07:59 +00:00
commit 6309d4c43d
3 changed files with 24 additions and 20 deletions

View file

@ -170,7 +170,7 @@ class Processor
}
}
$item['source'] = json_encode($post);
$item = $this->addMedia($post->thread->post->embed, $item, 0);
$item = $this->addMedia($post->thread->post->embed, $item, 0);
}
$id = Item::insert($item);
@ -354,6 +354,10 @@ class Processor
'source' => json_encode($data),
];
if ((time() - strtotime($item['created'])) > 600) {
$item['received'] = $item['created'];
}
if ($this->postExists($item['uri'], [$uid])) {
$this->logger->info('Post already exists for user', ['uri' => $item['uri'], 'uid' => $uid]);
return [];
@ -543,7 +547,7 @@ class Processor
'preview' => $image->thumb,
'description' => $image->alt,
'height' => $image->aspectRatio->height ?? null,
'width' => $image->aspectRatio->width ?? null,
'width' => $image->aspectRatio->width ?? null,
];
Post\Media::insert($media);
}