Browse Source

Issue 7285: Perform duplicate check for item URI also with AP

pull/7608/head
Michael 2 years ago
parent
commit
b2d6854829
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Model/Item.php

+ 2
- 2
src/Model/Item.php View File

@ -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


Loading…
Cancel
Save