Make TwitterBridge plugin use Queueing system

This commit is contained in:
Jean Baptiste Favre
2013-02-18 23:22:08 +01:00
parent dd97468c72
commit a10a34a3cf
3 changed files with 17 additions and 20 deletions

View File

@@ -51,10 +51,14 @@ class TweetInQueueHandler extends QueueHandler
$importer = new TwitterImport();
$notice = $importer->importStatus($status);
if ($notice) {
$flink = Foreign_link::getByForeignID(TWITTER_SERVICE, $receiver);
$flink = Foreign_link::getByForeignID($receiver, TWITTER_SERVICE);
if ($flink) {
common_log(LOG_DEBUG, "TweetInQueueHandler - Got flink so add notice ".
$notice->id." to inbox ".$flink->user_id);
// @fixme this should go through more regular channels?
Inbox::insertNotice($flink->user_id, $notice->id);
}else {
common_log(LOG_DEBUG, "TweetInQueueHandler - No flink found for foreign user ".$receiver);
}
}