From: Zach Copley Date: Wed, 13 Jan 2010 19:15:54 +0000 (+0000) Subject: When Twitter bridge encounters a 403 (rate limit) err, drop the notice X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=43170b3d18153b3dfd8675bd77ae1133eed8148a;p=quix0rs-gnu-social.git When Twitter bridge encounters a 403 (rate limit) err, drop the notice instead of requeuing. --- diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php index e133ce6f74..33dfb788bf 100644 --- a/plugins/TwitterBridge/twitter.php +++ b/plugins/TwitterBridge/twitter.php @@ -269,19 +269,23 @@ function process_error($e, $flink, $notice) common_log(LOG_WARNING, $logmsg); - if ($code == 401) { - + switch($code) { + case 401: // Probably a revoked or otherwise bad access token - nuke! - remove_twitter_link($flink); return true; - - } else { + break; + case 403: + // User has exceeder her rate limit -- toss the notice + return true; + break; + default: // For every other case, it's probably some flakiness so try // sending the notice again later (requeue). return false; + break; } }