• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_rest.php
  • Класс: CIMRestService
  • Вызов: CIMRestService::dialogUsersGet
static function dialogUsersGet($arParams, $n, CRestServer $server)
{
	$arParams = array_change_key_case($arParams, CASE_UPPER);

	if (isset($arParams['CHAT_ID']) && intval($arParams['CHAT_ID']) > 0)
	{
		$arParams['DIALOG_ID'] = 'chat'.$arParams['CHAT_ID'];
	}

	if (!BitrixImCommon::isDialogId($arParams['DIALOG_ID']))
	{
		throw new BitrixRestRestException("Dialog ID can't be empty", "DIALOG_ID_EMPTY", CRestServer::STATUS_WRONG_REQUEST);
	}

	if (!BitrixImDialog::hasAccess($arParams['DIALOG_ID']))
	{
		throw new BitrixRestRestException("You do not have access to the specified dialog", "ACCESS_ERROR", CRestServer::STATUS_FORBIDDEN);
	}

	$chatId = BitrixImDialog::getChatId($arParams['DIALOG_ID']);

	return BitrixImChat::getUsers($chatId, ['JSON' => 'Y']);
}