This should change the JSON representation of the booleans 'following' and 'notifications', but unlike the previous change, I was unable to test this.

This commit is contained in:
Dan Moore 2009-04-18 15:42:44 -04:00
parent 90fb7be99a
commit b764c3be78

View File

@ -103,22 +103,14 @@ class TwitapiusersAction extends TwitterapiAction
if (isset($apidata['user'])) {
if ($apidata['user']->isSubscribed($profile)) {
$twitter_user['following'] = 'true';
} else {
$twitter_user['following'] = 'false';
}
$twitter_user['following'] = $apidata['user']->isSubscribed($profile);
// Notifications on?
$sub = Subscription::pkeyGet(array('subscriber' =>
$apidata['user']->id, 'subscribed' => $profile->id));
if ($sub) {
if ($sub->jabber || $sub->sms) {
$twitter_user['notifications'] = 'true';
} else {
$twitter_user['notifications'] = 'false';
}
$twitter_user['notifications'] = ($sub->jabber || $sub->sms);
}
}