block subscribes by silenced users

This commit is contained in:
Evan Prodromou 2009-11-16 14:12:35 -05:00
parent e150d920a5
commit 2ad4de45e6
2 changed files with 8 additions and 0 deletions

View File

@ -462,6 +462,10 @@ class StatusNetOAuthDataStore extends OAuthDataStore
$subscribed = $this->_getAnyProfile($subscribed_user_uri);
$subscriber = $this->_getAnyProfile($subscriber_uri);
if (!$subscriber->hasRight(Right::SUBSCRIBE)) {
return _('You have been banned from subscribing.');
}
$sub->subscribed = $subscribed->id;
$sub->subscriber = $subscriber->id;

View File

@ -44,6 +44,10 @@ function subs_subscribe_user($user, $other_nickname)
function subs_subscribe_to($user, $other)
{
if (!$user->hasRight(Right::SUBSCRIBE)) {
return _('You have been banned from subscribing.');
}
if ($user->isSubscribed($other)) {
return _('Already subscribed!');
}