From b2d685482928363ce86c3c0519c8ff39d0af43ca Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Sep 2019 04:59:12 +0000 Subject: [PATCH] Issue 7285: Perform duplicate check for item URI also with AP --- src/Model/Item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 3a421e96c4..22859f76b4 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1398,9 +1398,9 @@ class Item extends BaseObject * via OStatus (maybe Diasporsa as well) */ if (empty($item['network']) || in_array($item['network'], Protocol::FEDERATED)) { - $condition = ["`uri` = ? AND `uid` = ? AND `network` IN (?, ?, ?)", + $condition = ["`uri` = ? AND `uid` = ? AND `network` IN (?, ?, ?, ?)", trim($item['uri']), $item['uid'], - Protocol::DIASPORA, Protocol::DFRN, Protocol::OSTATUS]; + Protocol::ACTIVITYPUB, Protocol::DIASPORA, Protocol::DFRN, Protocol::OSTATUS]; $existing = self::selectFirst(['id', 'network'], $condition); if (DBA::isResult($existing)) { // We only log the entries with a different user id than 0. Otherwise we would have too many false positives