Telegram bot empty subscribers change notification fix.
This commit is contained in:
parent
1372b7e6d1
commit
2d47fb4f4d
|
@ -84,9 +84,11 @@ class SubscriptionsManager
|
||||||
// Removing users from database
|
// Removing users from database
|
||||||
$this->em->getRepository('SkobkinPointToolsBundle:Subscription')->removeSubscribers($user, $unsubscribedList);
|
$this->em->getRepository('SkobkinPointToolsBundle:Subscription')->removeSubscribers($user, $unsubscribedList);
|
||||||
|
|
||||||
// Dispatching event
|
if (0 !== count($subscribedList) || 0 !== count($unsubscribedList)) {
|
||||||
$subscribersUpdatedEvent = new UserSubscribersUpdatedEvent($user, $subscribedList, $unsubscribedList);
|
// Dispatching event
|
||||||
$this->eventDispatcher->dispatch(UserSubscribersUpdatedEvent::NAME, $subscribersUpdatedEvent);
|
$subscribersUpdatedEvent = new UserSubscribersUpdatedEvent($user, $subscribedList, $unsubscribedList);
|
||||||
|
$this->eventDispatcher->dispatch(UserSubscribersUpdatedEvent::NAME, $subscribersUpdatedEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue