aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-30 00:50:57 -0700
committerzotlabs <mike@macgirvin.com>2017-06-30 00:50:57 -0700
commit64cad0a041e44940f75bf351fc3755b3202f9029 (patch)
tree080b9310c4f6656bdd047dd089bd19d02d539306
parentb73c844d1aec260c323715b55f2b290ce339615b (diff)
downloadvolse-hubzilla-64cad0a041e44940f75bf351fc3755b3202f9029.tar.gz
volse-hubzilla-64cad0a041e44940f75bf351fc3755b3202f9029.tar.bz2
volse-hubzilla-64cad0a041e44940f75bf351fc3755b3202f9029.zip
duplicated posts after conversation fetch
-rw-r--r--include/feedutils.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 27f189119..b64a98a7f 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1122,6 +1122,17 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
}
}
}
+
+ // the conversation parent might just be the post we are trying to import.
+ // check existence again in case it was just delivered.
+
+ $r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
+ dbesc($datarray['mid']),
+ intval($importer['channel_id'])
+ );
+ if($r) {
+ continue;
+ }
}
if(! $pmid) {