From: Evan Prodromou Date: Sat, 4 Sep 2010 15:40:33 +0000 (-0400) Subject: move inbox insert code to status saver main loop X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60b1e4afb7c8c78463119b7d2424c861816f57be;p=quix0rs-gnu-social.git move inbox insert code to status saver main loop --- diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 9892ffc057..e3f9553ffe 100755 --- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -222,7 +222,11 @@ class TwitterStatusFetcher extends ParallelizingDaemon continue; } - $this->saveStatus($status, $flink); + $notice = $this->saveStatus($status); + + if (!empty($notice)) { + Inbox::insertNotice($flink->user_id, $notice->id); + } } // Okay, record the time we synced with Twitter for posterity @@ -231,7 +235,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon $flink->update(); } - function saveStatus($status, $flink=null) + function saveStatus($status) { $profile = $this->ensureProfile($status->user); @@ -320,9 +324,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon Event::handle('EndNoticeSave', array($notice)); } - if (!empty($flink)) { - Inbox::insertNotice($flink->user_id, $notice->id); - } $notice->blowOnInsert(); return $notice;