diff options
author | Evan Prodromou <evan@status.net> | 2010-09-04 11:40:33 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-07 04:00:57 -0400 |
commit | 184ee7fc1f49f2638a03462679c14b92d4937ed0 (patch) | |
tree | 6250e479e17e0b7910c64b045bb1278c9feac810 /plugins/TwitterBridge/daemons | |
parent | 20f6ea484088b4f0e83bea0da9d556795035bb75 (diff) |
move inbox insert code to status saver main loop
Diffstat (limited to 'plugins/TwitterBridge/daemons')
-rwxr-xr-x | plugins/TwitterBridge/daemons/twitterstatusfetcher.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 9892ffc05..e3f9553ff 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; |