• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/queue/queue.php
  • Класс: BitrixImOpenLinesQueueQueue
  • Вызов: Queue::sendNotificationEmptyQueue
protected function sendNotificationEmptyQueue(int $configId): void
{
	if (Loader::includeModule('im'))
	{
		$message = Loc::getMessage('IMOL_QUEUE_NOTIFICATION_EMPTY_QUEUE', ['#URL#' => Common::getContactCenterPublicFolder() . 'lines_edit/?ID=' . $configId . '&SIDE=Y']);

		$notificationUserList = Common::getAdministrators();

		foreach($notificationUserList as $userId)
		{
			$notifyFields = [
				'TO_USER_ID' => $userId,
				'NOTIFY_TYPE' => IM_NOTIFY_SYSTEM,
				'NOTIFY_MODULE' => 'imopenlines',
				'NOTIFY_EVENT' => 'default',
				'NOTIFY_MESSAGE' => $message,
				'RECENT_ADD' => 'Y'
			];

			CIMNotify::Add($notifyFields);
		}
	}
}