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