We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2ad4de45 authored by Evan Prodromou's avatar Evan Prodromou

block subscribes by silenced users

parent e150d920
......@@ -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;
......
......@@ -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!');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment