From a7f6775f456a4973bc8dce71a436d5395c0cd1bc Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 27 Sep 2020 13:23:59 +0000 Subject: [PATCH] Avoid duplicate postings --- src/Model/Item.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Model/Item.php b/src/Model/Item.php index 03a62f584..1c307c699 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1834,6 +1834,11 @@ class Item if (!in_array($item['verb'], self::ACTIVITIES)) { $item['icid'] = self::insertContent($item); + if (empty($item['icid'])) { + // This most likely happens when identical posts arrives from different sources at the same time + Logger::warning('No content stored, quitting', ['guid' => $item['guid'], 'uri-id' => $item['uri-id'], 'causer-id' => ($item['causer-id'] ?? 0), 'post-type' => $item['post-type'], 'network' => $item['network']]); + return 0; + } } $body = $item['body'];