forked from GNUsocial/gnu-social
block subscribes by silenced users
This commit is contained in:
parent
e150d920a5
commit
2ad4de45e6
@ -462,6 +462,10 @@ class StatusNetOAuthDataStore extends OAuthDataStore
|
|||||||
$subscribed = $this->_getAnyProfile($subscribed_user_uri);
|
$subscribed = $this->_getAnyProfile($subscribed_user_uri);
|
||||||
$subscriber = $this->_getAnyProfile($subscriber_uri);
|
$subscriber = $this->_getAnyProfile($subscriber_uri);
|
||||||
|
|
||||||
|
if (!$subscriber->hasRight(Right::SUBSCRIBE)) {
|
||||||
|
return _('You have been banned from subscribing.');
|
||||||
|
}
|
||||||
|
|
||||||
$sub->subscribed = $subscribed->id;
|
$sub->subscribed = $subscribed->id;
|
||||||
$sub->subscriber = $subscriber->id;
|
$sub->subscriber = $subscriber->id;
|
||||||
|
|
||||||
|
@ -44,6 +44,10 @@ function subs_subscribe_user($user, $other_nickname)
|
|||||||
|
|
||||||
function subs_subscribe_to($user, $other)
|
function subs_subscribe_to($user, $other)
|
||||||
{
|
{
|
||||||
|
if (!$user->hasRight(Right::SUBSCRIBE)) {
|
||||||
|
return _('You have been banned from subscribing.');
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->isSubscribed($other)) {
|
if ($user->isSubscribed($other)) {
|
||||||
return _('Already subscribed!');
|
return _('Already subscribed!');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user