]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/apiaction.php
Merge branch 'beautify_profile_list' into 'nightly'
[quix0rs-gnu-social.git] / lib / apiaction.php
index 1bd80ad1225e74158482b816f5bd0277d455cdc8..9a574008aacf7bf9474c74d29f546061935d85f2 100644 (file)
@@ -274,11 +274,11 @@ class ApiAction extends Action
                 $sub = Subscription::getSubscription($this->scoped, $profile);
                 // Notifications on?
                 $twitter_user['following'] = true;
-                $twitter_user['statusnet_blocking']  = $this->scoped->hasBlocked($profile);
                 $twitter_user['notifications'] = ($sub->jabber || $sub->sms);
             } catch (NoResultException $e) {
                 // well, the values are already false...
             }
+            $twitter_user['statusnet_blocking']  = $this->scoped->hasBlocked($profile);            
         }
 
         if ($get_notice) {
@@ -651,6 +651,11 @@ class ApiAction extends Action
                 break;
             default:
                 if (strncmp($element, 'statusnet_', 10) == 0) {
+                    if ($element === 'statusnet_in_groups' && is_array($value)) {
+                        // QVITTERFIX because it would cause an array to be sent as $value
+                        // THIS IS UNDOCUMENTED AND SHOULD NEVER BE RELIED UPON (qvitter uses json output)
+                        $value = json_encode($value);
+                    }
                     $this->element('statusnet:'.substr($element, 10), null, $value);
                 } else {
                     $this->element($element, null, $value);