20 $settings = \Bitrix\Main\Config\Configuration::getValue(
'im');
21 if (!isset($settings[
'logger']))
26 foreach ($types as $type => $value)
28 if (isset($settings[
'logger'][$type]))
30 $types[$type] = (bool)$settings[
'logger'][$type];
39 $broadcastingEnabled =
false;
41 $settings = \Bitrix\Main\Config\Configuration::getValue(
'im');
43 if (!isset($settings[
'call'][
'broadcast_enabled']))
45 return $broadcastingEnabled;
48 return (
bool)$settings[
'call'][
'broadcast_enabled'];
56 $result = \Bitrix\Main\Config\Option::get(
'im',
'call_beta_access',
'N');
57 return $result ===
'Y';
65 $result = \Bitrix\Main\Config\Option::get(
'im',
'ai_beta_access',
'N');
66 return $result ===
'Y';
77 if (!\
Bitrix\Main\Loader::includeModule(
'intranet'))
87 if (!self::isV2Available())
92 if (\
Bitrix\Main\
Config\Option::get(
'im',
'legacy_chat_enabled',
'N') ===
'Y')
96 if (\CUserOptions::GetOption(
'im',
'legacy_chat_user_enabled',
'N', $userId) ===
'Y')
101 $isLegacy = \Bitrix\Main\Context::getCurrent()->getRequest()->getQuery(
'IM_LEGACY');
102 $isIframe = \Bitrix\Main\Context::getCurrent()->getRequest()->getQuery(
'IFRAME');
104 return $isLegacy ===
'Y' || $isIframe ===
'Y';
109 if (!self::isV2Available())
114 \CUserOptions::SetOption(
'im',
'legacy_chat_user_enabled', $active ?
'Y' :
'N',
false, $userId);
115 \Bitrix\Intranet\Composite\CacheProvider::deleteUserCache();
static getUserId($userId=null)
static setLegacyChatActivity($active=true, $userId=false)
static isCallBetaAvailable()
static isBroadcastingEnabled()
static isAiBetaAvailable()
static isLegacyChatActivated($userId=false)