Chat::deleteChat

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Chat
  4. deleteChat
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/im/chat.php
  • Класс: Bitrix\Crm\Integration\Im\Chat
  • Вызов: Chat::deleteChat
static function deleteChat(array $params = [])
{
	if (!\Bitrix\Main\Loader::includeModule('im'))
	{
		return;
	}

	$entityTypeName = isset($params['ENTITY_TYPE']) ? $params['ENTITY_TYPE'] : '';
	if($entityTypeName === '')
	{
		$entityTypeID = isset($params['ENTITY_TYPE_ID']) ? (int)$params['ENTITY_TYPE_ID'] : 0;
		if($entityTypeID > 0)
		{
			$entityTypeName = \CCrmOwnerType::ResolveName($entityTypeID);
		}
	}

	$entityId = isset($params['ENTITY_ID']) ? (int)$params['ENTITY_ID'] : 0;
	if($entityTypeName !== '' && $entityId > 0)
	{
		\CIMChat::DeleteEntityChat(self::CHAT_ENTITY_TYPE, $entityTypeName.'|'.$entityId);
	}
}

Добавить комментарий