• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/bot/partner24.php
  • Класс: BitrixImBotBotPartner24
  • Вызов: Partner24::finishDialogSession
static function finishDialogSession($params)
{
	if (self::isActiveSupport())
	{
		if (isset($params['DIALOG_ID']) && preg_match('/^[0-9]+$/i', $params['DIALOG_ID']))
		{
			$userId = (int)$params['DIALOG_ID'];

			if (!self::isUserIntegrator($userId) && self::isActiveSupportForUser($userId))
			{
				// Message with survey of the partner support quality.
				$message = self::getMessage('MESSAGE_QUALITY_SURVEY');

				if (!empty($message))
				{
					self::sendMessage([
						'DIALOG_ID' => $userId,
						'MESSAGE' => $message,
						'SYSTEM' => 'N',
						'URL_PREVIEW' => 'N',
					]);
				}
			}
		}
	}

	return parent::finishDialogSession($params);
}