From: Dan Moore Date: Sat, 18 Apr 2009 19:42:44 +0000 (-0400) Subject: This should change the JSON representation of the booleans 'following' and 'notificat... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b764c3be78aef4305b75b14d7f3e8c9f1c552f9e;p=quix0rs-gnu-social.git This should change the JSON representation of the booleans 'following' and 'notifications', but unlike the previous change, I was unable to test this. --- diff --git a/actions/twitapiusers.php b/actions/twitapiusers.php index 41d0d955b1..92d67454cc 100644 --- a/actions/twitapiusers.php +++ b/actions/twitapiusers.php @@ -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); } }