]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
This should change the JSON representation of the booleans 'following' and 'notificat...
authorDan Moore <dan@moore.cx>
Sat, 18 Apr 2009 19:42:44 +0000 (15:42 -0400)
committerDan Moore <dan@moore.cx>
Sat, 18 Apr 2009 19:42:44 +0000 (15:42 -0400)
actions/twitapiusers.php

index 41d0d955b1e39d377c9b4988e6cd61945d228841..92d67454ccf4e64abdd3fab4a063907ad12fee56 100644 (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);
             }
         }