• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/imopenlines/gotochat.php
  • Класс: Bitrix\Crm\Integration\ImOpenLines\GoToChat
  • Вызов: GoToChat::getUrl
private function getUrl(string $lineId, Channel\Correspondents\To $to): string
{
	$bindings = [];
	$bindings[] = $to->getRootSource()->toArray();
	if ($to->getRootSource()->getEntityTypeId() !== $to->getAddressSource()->getEntityTypeId())
	{
		$bindings[] = $to->getRootSource()->toArray();
	}

	$tracker = \Bitrix\Main\DI\ServiceLocator::getInstance()->get('ImOpenLines.Services.Tracker');

	return $tracker->getMessengerLink(
		$lineId,
		self::TELEGRAM_BOT_CONNECTOR_ID,
		$bindings
	)['web'];
}