mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:02:53 +00:00
Check the edit date before storing history
This commit is contained in:
parent
d77b043d9c
commit
2c511b8a23
1 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,12 @@ class History
|
|||
|
||||
$post = Post::selectFirstPost($fields, ['uri-id' => $uri_id]);
|
||||
if (empty($post)) {
|
||||
Logger::warning('Post not found', ['uri-id' => $uri_id]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($item['edited'] <= $post['edited']) {
|
||||
Logger::info('New edit date is not newer than the old one', ['uri-id' => $uri_id, 'old' => $post['edited'], 'new' => $item['edited']]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue