summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/twitter.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-15 21:10:45 +0000
committerZach Copley <zach@status.net>2010-02-15 21:13:53 +0000
commitfe2ebec732ecae97b0616cdf627cbaeaf53dab48 (patch)
tree2f87d11cb56c19f13293238f16ee43efd23a2669 /plugins/TwitterBridge/twitter.php
parentcfe4e460ca68b7c4d6c8213cf78df8a48414e342 (diff)
Fix for regression introduced with my last update to the
TwitterStatusFetcher: the Twitter bridge was not saving a foreign user record when making a foreign link.
Diffstat (limited to 'plugins/TwitterBridge/twitter.php')
-rw-r--r--plugins/TwitterBridge/twitter.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index 5761074c2..1d46aa2c9 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -28,6 +28,7 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
function add_twitter_user($twitter_id, $screen_name)
{
+ common_debug("Add Twitter user");
$new_uri = 'http://twitter.com/' . $screen_name;
@@ -40,7 +41,7 @@ function add_twitter_user($twitter_id, $screen_name)
$luser->service = TWITTER_SERVICE;
$result = $luser->delete();
- if (empty($result)) {
+ if ($result != false) {
common_log(LOG_WARNING,
"Twitter bridge - removed invalid Twitter user squatting on uri: $new_uri");
}
@@ -93,9 +94,9 @@ function save_twitter_user($twitter_id, $screen_name)
$screen_name,
$oldname));
}
-
- return add_twitter_user($twitter_id, $screen_name);
}
+
+ return add_twitter_user($twitter_id, $screen_name);
}
function is_twitter_bound($notice, $flink) {