Server IP : 85.193.89.191 / Your IP : 18.117.151.252 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bitrix/www/bitrix/components/bitrix/im.jitsi.conference/ |
Upload File : |
<?php if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) { die(); } use Bitrix\Im\Call\Call; use Bitrix\Im\Call\Conference; use Bitrix\Im\Chat; use Bitrix\Intranet\Util; use Bitrix\Main\Config\Option; use Bitrix\Main\Context; use Bitrix\Main\Data\LocalStorage\SessionLocalStorage; use \Bitrix\Main\Loader, \Bitrix\Main\Localization\Loc; use Bitrix\Main\Page\Asset; class ImComponentJitsiConference extends CBitrixComponent { public function executeComponent() { global $USER; if (!$USER->IsAuthorized()) { $USER->LoginByCookies(); } $jitsiServer = Option::get('im', 'jitsi_server', ''); $this->arResult['JITSI_SERVER'] = $jitsiServer; $this->arResult['JITSI_EXTERNAL_API'] = "https://{$jitsiServer}/external_api.js"; $this->arResult['ALIAS'] = $this->arParams['ALIAS']; $this->arResult['USER_NAME'] = \Bitrix\Im\User::getInstance()->getFullName(); $this->arResult['USER_EMAIL'] = \Bitrix\Im\User::getInstance()->getEmail(); $chatId = (int)$this->arParams['CHAT_ID']; if ($chatId > 0) { $chatData = \CIMChat::GetChatData([ 'ID' => $chatId, 'USER_ID' => $USER->GetID() ]); if ($chatData) { $chatFields = $chatData['chat'][$chatId]; $this->arResult['CHAT_NAME'] = $chatFields['name']; } } $this->includeComponentTemplate(); } }