• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/notificationsmanager.php
  • Класс: Bitrix\Crm\Integration\NotificationsManager
  • Вызов: NotificationsManager::sendMessage
static function sendMessage(array $messageFields)
{
	$templateCode = $messageFields['TEMPLATE_CODE'] ?? null;

	$canSendMessage = (
		$templateCode === GoToChat::NOTIFICATIONS_MESSAGE_CODE
			? static::canUse()
			: static::canSendMessage()
	);

	if ($canSendMessage)
	{
		if (NotificationsPromoManager::isPromoSession())
		{
			NotificationsPromoManager::usePromo();
		}

		return Message::create($messageFields)->enqueue();
	}

	return false;
}