From: Evan Prodromou Date: Sun, 5 Sep 2010 03:49:52 +0000 (-0400) Subject: use Notice_to_status to check for duplicates X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b2bcbf4a777c1fa7af91df6041296d5814b585b2;p=quix0rs-gnu-social.git use Notice_to_status to check for duplicates --- diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index ae66c50aed..027e572b02 100755 --- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -247,15 +247,15 @@ class TwitterStatusFetcher extends ParallelizingDaemon // check to see if we've already imported the status - $dupe = $this->checkDupe($profile, $statusUri); + $n2s = Notice_to_status::staticGet('status_id', $status->id); - if (!empty($dupe)) { + if (!empty($n2s)) { common_log( LOG_INFO, $this->name() . - " - Ignoring duplicate import: $statusUri" + " - Ignoring duplicate import: {$status->id}" ); - return $dupe; + return Notice::staticGet('id', $n2s->notice_id); } common_debug("Saving status {$status->id} with data " . print_r($status, true));