mirror of
https://github.com/friendica/friendica
synced 2025-01-19 03:04:28 +00:00
Merge pull request #14703 from annando/atp-archive
Improved handling of archive posts
This commit is contained in:
commit
cd79d26ed5
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue