• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/bot/supportbox.php
  • Класс: BitrixImBotBotSupportBox
  • Вызов: SupportBox::onChatStart
static function onChatStart($dialogId, $joinFields)
{
	if (!MainLoader::includeModule('im'))
	{
		return false;
	}

	if (!self::checkMembershipRestriction($joinFields))
	{
		$groupLimited = self::getMessage('GROUP_LIMITED');
		if ($groupLimited)
		{
			self::sendMessage([
				'DIALOG_ID' => $dialogId,
				'MESSAGE' => $groupLimited,
				'SYSTEM' => 'N',
				'URL_PREVIEW' => 'N'
			]);
		}

		(new CIMChat(self::getBotId()))->deleteUser(mb_substr($dialogId, 4), self::getBotId());

		return true;
	}

	return true;
}