]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use Notice_to_status to check for duplicates
authorEvan Prodromou <evan@status.net>
Sun, 5 Sep 2010 03:49:52 +0000 (23:49 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 5 Sep 2010 03:49:52 +0000 (23:49 -0400)
plugins/TwitterBridge/daemons/twitterstatusfetcher.php

index ae66c50aed780689bc4a36489f71bea2fb8f74bb..027e572b029d6a3ad25ddf0afc1102e318bc4705 100755 (executable)
@@ -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));