diff --git a/extensions/subscriptions/src/Listener/FollowAfterReply.php b/extensions/subscriptions/src/Listener/FollowAfterReply.php index 5dcec42a5..14bd52175 100644 --- a/extensions/subscriptions/src/Listener/FollowAfterReply.php +++ b/extensions/subscriptions/src/Listener/FollowAfterReply.php @@ -10,18 +10,15 @@ namespace Flarum\Subscriptions\Listener; use Flarum\Post\Event\Posted; -use Flarum\User\AssertPermissionTrait; class FollowAfterReply { - use AssertPermissionTrait; - public function handle(Posted $event) { $actor = $event->actor; if ($actor && $actor->exists && $actor->getPreference('followAfterReply')) { - $this->assertRegistered($actor); + $actor->assertRegistered(); $state = $event->post->discussion->stateFor($actor); diff --git a/extensions/subscriptions/src/Listener/SaveSubscriptionToDatabase.php b/extensions/subscriptions/src/Listener/SaveSubscriptionToDatabase.php index 1275ac5dc..d887208f8 100755 --- a/extensions/subscriptions/src/Listener/SaveSubscriptionToDatabase.php +++ b/extensions/subscriptions/src/Listener/SaveSubscriptionToDatabase.php @@ -10,12 +10,9 @@ namespace Flarum\Subscriptions\Listener; use Flarum\Discussion\Event\Saving; -use Flarum\User\AssertPermissionTrait; class SaveSubscriptionToDatabase { - use AssertPermissionTrait; - public function handle(Saving $event) { $discussion = $event->discussion; @@ -25,7 +22,7 @@ class SaveSubscriptionToDatabase $actor = $event->actor; $subscription = $data['attributes']['subscription']; - $this->assertRegistered($actor); + $actor->assertRegistered(); $state = $discussion->stateFor($actor);