Commit 1eff1085 authored by mmn's avatar mmn

Merge branch 'twitter-check-dupe-by-uri' into 'master'

TwitterBridge also check for dupe by uri

In case a twitter item came in from some other source (such as linkback).

See merge request !45
parents 2addf8e4 ddfb56d9
......@@ -102,6 +102,17 @@ class TwitterImport
return Notice::getKV('id', $n2s->notice_id);
}
$dupe = Notice::getKV('uri', $statusUri);
if($dupe instanceof Notice) {
// Add it to our record
Notice_to_status::saveNew($dupe->id, $statusId);
common_log(
LOG_INFO,
__METHOD__ . " - Ignoring duplicate import: {$statusId}"
);
return $dupe;
}
// If it's a retweet, save it as a repeat!
if (!empty($status->retweeted_status)) {
common_log(LOG_INFO, "Status {$statusId} is a retweet of " . twitter_id($status->retweeted_status) . ".");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment