use Notice_to_status to check for duplicates

This commit is contained in:
Evan Prodromou 2010-09-04 23:49:52 -04:00
parent 16b219f1ef
commit b2bcbf4a77
1 changed files with 4 additions and 4 deletions

View File

@ -247,15 +247,15 @@ class TwitterStatusFetcher extends ParallelizingDaemon
// check to see if we've already imported the status // 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( common_log(
LOG_INFO, LOG_INFO,
$this->name() . $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)); common_debug("Saving status {$status->id} with data " . print_r($status, true));