Tidying up getUser calls to profiles and some events
getUser calls are much more strict, and one place where this was found was in the (un)subscribe start/end event handlers, which resulted in making the Subscription class a bit stricter, regarding ::start and ::cancel at least. Several minor fixes in many files were made due to this. This does NOT touch the Foreign_link function, which should also have a more strict getUser call. That is a future project.
This commit is contained in:
@@ -777,8 +777,7 @@ class SubCommand extends Command
|
||||
}
|
||||
|
||||
try {
|
||||
Subscription::start($this->user->getProfile(),
|
||||
$target);
|
||||
Subscription::start($this->user->getProfile(), $target);
|
||||
// TRANS: Text shown after having subscribed to another user successfully.
|
||||
// TRANS: %s is the name of the user the subscription was requested for.
|
||||
$channel->output($this->user, sprintf(_('Subscribed to %s.'), $this->other));
|
||||
@@ -809,8 +808,7 @@ class UnsubCommand extends Command
|
||||
$target = $this->getProfile($this->other);
|
||||
|
||||
try {
|
||||
Subscription::cancel($this->user->getProfile(),
|
||||
$target);
|
||||
Subscription::cancel($this->user->getProfile(), $target);
|
||||
// TRANS: Text shown after having unsubscribed from another user successfully.
|
||||
// TRANS: %s is the name of the user the unsubscription was requested for.
|
||||
$channel->output($this->user, sprintf(_('Unsubscribed from %s.'), $this->other));
|
||||
|
Reference in New Issue
Block a user