[COMPONENT][Notification] ->getSubscribers() should not be pre-included
Notification bug fix on Subscription component Correct docblock
This commit is contained in:
@@ -40,7 +40,6 @@ use App\Util\Exception\ServerException;
|
||||
use Component\Notification\Entity\Attention;
|
||||
use Component\Subscription\Controller\Subscribers as SubscribersController;
|
||||
use Component\Subscription\Controller\Subscriptions as SubscriptionsController;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class Subscription extends Component
|
||||
@@ -99,7 +98,7 @@ class Subscription extends Component
|
||||
$activity = null;
|
||||
if (\is_null($subscription)) {
|
||||
DB::persist($subscription = Entity\ActorSubscription::create($opts));
|
||||
$activity = Activity::create([
|
||||
$activity = Activity::create([
|
||||
'actor_id' => $subscriber_id,
|
||||
'verb' => 'subscribe',
|
||||
'object_type' => Actor::schemaName(),
|
||||
@@ -163,7 +162,7 @@ class Subscription extends Component
|
||||
Event::handle('NewNotification', [
|
||||
\is_int($subject) ? $subject : Actor::getById($subscriber_id),
|
||||
$activity,
|
||||
[],
|
||||
[$subscribed_id],
|
||||
_m('{subject} unsubscribed from {object}.', ['{subject}' => $activity->getActorId(), '{object}' => $previous_follow_activity->getObjectId()]),
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user