X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fapiaction.php;h=4b4c94aed917648807803656c815565bc7c0a7f0;hb=852924799f6779195ca457296d94e982d41672fa;hp=d945d532d013969e139b73a40ff7bdf0d7700ff5;hpb=1ee79dc3791162f7ef9b92befaef597328266ce1;p=quix0rs-gnu-social.git diff --git a/lib/apiaction.php b/lib/apiaction.php old mode 100644 new mode 100755 index d945d532d0..4b4c94aed9 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -127,6 +127,7 @@ class ApiAction extends Action var $since_id = null; var $source = null; var $callback = null; + var $format = null; var $access = self::READ_ONLY; // read (default) or read-write @@ -579,13 +580,16 @@ class ApiAction extends Action { $details = array(); + $source_profile = $source->getProfile(); + $target_profile = $target->getProfile(); + $details['screen_name'] = $source->nickname; - $details['followed_by'] = $target->isSubscribed($source); - $details['following'] = $source->isSubscribed($target); + $details['followed_by'] = $target->isSubscribed($source_profile); + $details['following'] = $source->isSubscribed($target_profile); $notifications = false; - if ($source->isSubscribed($target)) { + if ($source->isSubscribed($target_profile)) { $sub = Subscription::pkeyGet(array('subscriber' => $source->id, 'subscribed' => $target->id)); @@ -595,7 +599,7 @@ class ApiAction extends Action } $details['notifications_enabled'] = $notifications; - $details['blocking'] = $source->hasBlocked($target); + $details['blocking'] = $source->hasBlocked($target_profile); $details['id'] = intval($source->id); return $details;