- Модуль: im
- Путь к файлу: ~/bitrix/modules/im/classes/general/im_call.php
- Класс: CIMCall
- Вызов: CIMCall::Command
static function Command($chatId, $recipientId, $command, $params = Array())
{
if (!CModule::IncludeModule("pull"))
return false;
$chatId = intval($chatId);
$recipientId = intval($recipientId);
if ($recipientId <= 0 || $chatId <= 0 || empty($command) || !is_array($params))
return false;
global $USER;
$params['senderId'] = $USER->GetID();
$params['chatId'] = $chatId;
$params['command'] = $command;
BitrixPullEvent::add($recipientId, Array(
'module_id' => 'im',
'command' => 'call',
'expiry' => 600,
'params' => $params,
'extra' => BitrixImCommon::getPullExtra()
));
return true;
}