1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CIMMessenger

Открытые члены

 __construct ($user_id=false)
 GetSonetCode ($user_id, $site_id=SITE_ID)

Открытые статические члены

static Add ($arFields)
static IsMobileRequest ()
static CheckPossibilityUpdateMessage ($type, $id, $userId=null)
static Update ($id, $text, $urlPreview=true, $editFlag=true, $userId=null, $byEvent=false, $convert=false)
static Share ($id, $type, $date='')
static disappearMessage (int $messageId, int $hours, ?int $userId=null)
static Delete ($id, $userId=null, $completeDelete=false, $byEvent=false)
static LinesSessionVote ($dialogId, $messageId, $action, $userId=null)
static Like ($id, $action='auto', $userId=null, $byEvent=false, $withReaction=true)
static ExecCommand ($id, $botId, $command, $commandParams='', $userId=null, $byEvent=false)
static UrlAttachDelete ($id, $attachId=false, $userId=null)
static GetById ($ID, $params=Array())
static GetRelationById ($ID, bool $raw=false)
static CheckXmppStatusOnline ()
static CheckEnableOpenChat ()
static CheckNetwork ()
static CheckNetwork2 ()
static CheckInstallDesktop ()
static EnableInVersion ($version)
static IsDesktopEnvironment ()
static SetDesktopVersion ($version)
static GetDesktopVersion ()
static SetDesktopLastActivityDate ($timestamp, $deviceType=IM_DESKTOP_WINDOWS, $userId=false)
static CheckPhoneStatus ()
static CanUserCallCrmNumber ()
static CanUserCallUserNumber ()
static CanCallByLimits ()
static CanUserCallAnyNumber ()
static CanUserPerformCalls ()
static CanInterceptCall ()
static GetCallCardRestApps ()
static GetTelephonyAvailableLines ($userId=null)
static GetDefaultTelephonyLine ($userId=null)
static CheckDesktopStatusOnline ($userId=null)
static GetDesktopStatusOnline ($userId=null)
static SetDesktopStatusOnline ($userId=null, $cache=true)
static SetDesktopStatusOffline ($userId=null)
static GetSettings ($userId=false)
static GetFormatFilesMessageOut ($files)
static GetSessionLifeTime ()
static GetUnreadCounter ($userId)
static GetMessageCounter ($userId, $arMessages=Array())
static SpeedFileCreate ($userID, $value, $type=IM_SPEED_MESSAGE)
static SpeedFileDelete ($userID, $type=IM_SPEED_MESSAGE)
static SpeedFileExists ($userID, $type=IM_SPEED_MESSAGE)
static SpeedFileGet ($userID, $type=IM_SPEED_MESSAGE)
static GetTemplateJS ($arParams, $arTemplate)
static GetV2TemplateJS ($arResult)
static getPhoneSettings ()
static GetMobileDialogTemplateJS ($arParams, $arTemplate)
static StartWriting ($dialogId, $userId=false, $userName="", $byEvent=false, $linesSilentMode=false)
static PrepareSmiles ()
static SendMention ($params)
static PrepareParamsForPull ($params)
static PreparePushForMentionInChat ($params)
static PreparePushForChat ($params)
static PreparePushForPrivate ($params)
static PrepareParamsForPush ($params)
static PrepareMessageForPush ($message)
static PrepareEventForPush ($command, $event)
static PrepareMessageForPushSendPutCallBack ($params)
static PrepareMessageForPushIconCallBack ($params)
static GetCachePath ($id)
static EnableMessageCheck ()
static DisableMessageCheck ()
static IsEnabledMessageCheck ()
static IsBitrix24UserRestricted ()
static IsMysqlDb ()
static IsAdmin ()
static GetCurrentUserId ()
static loadLoc ()
static needToSendPublicPull (?string $chatType)

Поля данных

const MESSAGE_LIMIT = 20000

Защищенные статические члены

static decodeEmoji ($value)
static needSendPush (array $arChat)
static filterRelationsByParentRelations (array $relations, int $chatId)
static getRealPrevId (int $messageId, int $chatId)
static getChatRelationForMention (Chat $chat, array $users)
static getMessageObject (array $fields)
static throwLegacyExceptionFromErrors (array $errors)

Подробное описание

См. определение в файле im_messenger.php строка 23

Конструктор(ы)

◆ __construct()

__construct ( $user_id = false)

См. определение в файле im_messenger.php строка 30

Методы

◆ Add()

Add ( $arFields)
static

Sends instant message.

Аргументы
array$arFields
[
    (string) MESSAGE_TYPE - Message type:
        use const IM_MESSAGE_SYSTEM = S - notification,
        use const IM_MESSAGE_PRIVATE = P - private chat,
        use const IM_MESSAGE_CHAT = S - group chat,
        use const IM_MESSAGE_OPEN = O - open chat,
        use const IM_MESSAGE_OPEN_LINE = L - open line chat.

    (string|int) DIALOG_ID - Dialog Id:
        chatNNN - chat,
        sgNNN - sonet group,
        crmNNN - crm chat,
        NNN - recipient user.

    (string) MESSAGE_DATE - Setup the message creation date. String representation of datetime.
    (int) TO_CHAT_ID - Chat Id.
    (int) TO_USER_ID - Recipient user Id.
    (int) FROM_USER_ID - Sender user Id.
    (int) AUTHOR_ID - Created by Id.
    (string) MESSAGE - Message to send.
    (string) MESSAGE_OUT - Formated rich message.
    (Y|N) SYSTEM - Display message as a system notification.

    (array | \CIMMessageParamAttach) ATTACH - Message attachment.
    (array) FILES - Message file attachments.
    (\Bitrix\Im\Bot\Keyboard) KEYBOARD - Message keyboard.
    (\Bitrix\Im\Bot\ContextMenu) MENU - Message context menu.
    (array) PARAMS - Message additional parameters.

    (int) NOTIFY_TYPE - Notification type:
        use const IM_NOTIFY_CONFIRM = 1 - confirm,
        use const IM_NOTIFY_FROM = 2 - notify single from,
        use const IM_NOTIFY_SYSTEM = 4 - notify single.
    (string) NOTIFY_MODULE - Source module id (ex: xmpp, main, etc).
    (string) NOTIFY_EVENT - Source module event id for search (ex: IM_GROUP_INVITE).
    (string) NOTIFY_TITLE - Notify title for sending email.
    (string) TITLE - Alias for NOTIFY_TITLE parameter.
    (array) NOTIFY_BUTTONS - Array of buttons - available with NOTIFY_TYPE = 1
                    Array(
                        Array('TITLE' => 'OK', 'VALUE' => 'Y', 'TYPE' => 'accept', 'URL' => '/test.php?CONFIRM=Y'),
                        Array('TITLE' => 'Cancel', 'VALUE' => 'N', 'TYPE' => 'cancel', 'URL' => '/test.php?CONFIRM=N'),
                    )
    (string) NOTIFY_TAG - Field for group in JS notification and search in table.
    (string) NOTIFY_SUB_TAG - Second TAG for search in table.
    (Y|N) NOTIFY_ANSWER - Allow answering right in notification balloon.
    (string) EMAIL_TEMPLATE - E-mail template code.
    (string) NOTIFY_EMAIL_TEMPLATE - Alias to EMAIL_TEMPLATE parameter.
    (string) NOTIFY_LINK - Url to dislplay in notification balloon.
    (string) NOTIFY_MESSAGE - Alias for MESSAGE parameter.
    (string) NOTIFY_MESSAGE_OUT - Alias for MESSAGE_OUT parameter.
    (string) NOTIFY_ONLY_FLASH - Display only balloon without adding message into notification list.

    (Y|N) PUSH - Allows sending pull.
    (string) MESSAGE_PUSH - Private or chat push message.
    (string) PUSH_MESSAGE - Notification push message.
    (array) PUSH_PARAMS - Notification push params.
    (string) PUSH_IMPORTANT - Send push immediately.
    (string) TEMPLATE_ID - UUID of the message, which generates on the frontend.
    (string) FILE_TEMPLATE_ID
    (array) EXTRA_PARAMS

    (bool) RECENT_SKIP_AUTHOR - Do not add author in recent list in case of self message chat.
    (Y|N) RECENT_ADD - N = Skip refresh of the recent list for chat relations. Do not flow up recent on hidden notification.

    (int) IMPORT_ID - The ID of the message to be imported.
    (Y|N) CONVERT - Suppress events firing and pull sending on import operations.

    (Y|N) URL_PREVIEW - Generate URL preview attachment and insert date PUT/SEND command: Y|N.
    (Y|N) SKIP_URL_INDEX - Skip Link\Url processing 
См. также
 \Bitrix\Im\V2\Link\Url\UrlService::saveUrlsFromMessage
    (Y|N) SKIP_COUNTER_INCREMENTS - Skip increasing counters
    (Y|N) SKIP_PULL - Skip send pull

    (Y|N) SKIP_COMMAND - Skip command execution 
 \Bitrix\Im\Command::onCommandAdd

    (Y|N) SILENT_CONNECTOR - Keep silent. Do not send message into OL connector to client side. 
 \Bitrix\ImOpenLines\Connector::onMessageSend
    (Y|N) SKIP_CONNECTOR - Do not send message into OL connector to client side. 
 \Bitrix\ImOpenLines\Connector::onMessageSend
    (Y|N) IMPORTANT_CONNECTOR - Forward message into OL channel either mark as system. 
 \Bitrix\ImOpenLines\Connector::onMessageSend
    (Y|N) NO_SESSION_OL - Do not touch OL session 
 \Bitrix\ImOpenLines\Connector::onMessageSend

    (Y|N) SKIP_USER_CHECK - Skip chat relations check. Check if user has permission to write into open chat, open line or announce channel. Default - N
]
Возвращает
int|false

См. определение в файле im_messenger.php строка 128

◆ CanCallByLimits()

CanCallByLimits ( )
static

См. определение в файле im_messenger.php строка 3155

◆ CanInterceptCall()

CanInterceptCall ( )
static

См. определение в файле im_messenger.php строка 3187

◆ CanUserCallAnyNumber()

CanUserCallAnyNumber ( )
static

См. определение в файле im_messenger.php строка 3165

◆ CanUserCallCrmNumber()

CanUserCallCrmNumber ( )
static

См. определение в файле im_messenger.php строка 3129

◆ CanUserCallUserNumber()

CanUserCallUserNumber ( )
static

См. определение в файле im_messenger.php строка 3142

◆ CanUserPerformCalls()

CanUserPerformCalls ( )
static

См. определение в файле im_messenger.php строка 3178

◆ CheckDesktopStatusOnline()

CheckDesktopStatusOnline ( $userId = null)
static

См. определение в файле im_messenger.php строка 3242

◆ CheckEnableOpenChat()

CheckEnableOpenChat ( )
static

См. определение в файле im_messenger.php строка 3004

◆ CheckInstallDesktop()

CheckInstallDesktop ( )
static

См. определение в файле im_messenger.php строка 3023

◆ CheckNetwork()

CheckNetwork ( )
static

См. определение в файле im_messenger.php строка 3009

◆ CheckNetwork2()

CheckNetwork2 ( )
static

См. определение в файле im_messenger.php строка 3014

◆ CheckPhoneStatus()

CheckPhoneStatus ( )
static

См. определение в файле im_messenger.php строка 3121

◆ CheckPossibilityUpdateMessage()

CheckPossibilityUpdateMessage ( $type,
$id,
$userId = null )
static

См. определение в файле im_messenger.php строка 1919

◆ CheckXmppStatusOnline()

CheckXmppStatusOnline ( )
static

См. определение в файле im_messenger.php строка 2993

◆ decodeEmoji()

decodeEmoji ( $value)
staticprotected

См. определение в файле im_messenger.php строка 4343

◆ Delete()

Delete ( $id,
$userId = null,
$completeDelete = false,
$byEvent = false )
static

См. определение в файле im_messenger.php строка 2336

◆ DisableMessageCheck()

DisableMessageCheck ( )
static

См. определение в файле im_messenger.php строка 5185

◆ disappearMessage()

disappearMessage ( int $messageId,
int $hours,
?int $userId = null )
static

Disappear message

Аргументы
int$messageId
int$hours
Возвращает
bool

См. определение в файле im_messenger.php строка 2319

◆ EnableInVersion()

EnableInVersion ( $version)
static

См. определение в файле im_messenger.php строка 3038

◆ EnableMessageCheck()

EnableMessageCheck ( )
static

См. определение в файле im_messenger.php строка 5180

◆ ExecCommand()

ExecCommand ( $id,
$botId,
$command,
$commandParams = '',
$userId = null,
$byEvent = false )
static

См. определение в файле im_messenger.php строка 2674

◆ filterRelationsByParentRelations()

filterRelationsByParentRelations ( array $relations,
int $chatId )
staticprotected

См. определение в файле im_messenger.php строка 5248

◆ GetById()

GetById ( $ID,
$params = Array() )
static

См. определение в файле im_messenger.php строка 2918

◆ GetCachePath()

GetCachePath ( $id)
static

См. определение в файле im_messenger.php строка 5152

◆ GetCallCardRestApps()

GetCallCardRestApps ( )
static

См. определение в файле im_messenger.php строка 3196

◆ getChatRelationForMention()

getChatRelationForMention ( Chat $chat,
array $users )
staticprotected

См. определение в файле im_messenger.php строка 5285

◆ GetCurrentUserId()

GetCurrentUserId ( )
static

См. определение в файле im_messenger.php строка 5219

◆ GetDefaultTelephonyLine()

GetDefaultTelephonyLine ( $userId = null)
static

См. определение в файле im_messenger.php строка 3231

◆ GetDesktopStatusOnline()

GetDesktopStatusOnline ( $userId = null)
static

См. определение в файле im_messenger.php строка 3276

◆ GetDesktopVersion()

GetDesktopVersion ( )
static

См. определение в файле im_messenger.php строка 3075

◆ GetFormatFilesMessageOut()

GetFormatFilesMessageOut ( $files)
static

См. определение в файле im_messenger.php строка 3409

◆ GetMessageCounter()

GetMessageCounter ( $userId,
$arMessages = Array() )
static

См. определение в файле im_messenger.php строка 3490

◆ getMessageObject()

getMessageObject ( array $fields)
staticprotected

См. определение в файле im_messenger.php строка 5342

◆ GetMobileDialogTemplateJS()

GetMobileDialogTemplateJS ( $arParams,
$arTemplate )
static

См. определение в файле im_messenger.php строка 3887

◆ getPhoneSettings()

getPhoneSettings ( )
static

См. определение в файле im_messenger.php строка 3857

◆ getRealPrevId()

getRealPrevId ( int $messageId,
int $chatId )
staticprotected

См. определение в файле im_messenger.php строка 5271

◆ GetRelationById()

GetRelationById ( $ID,
bool $raw = false )
static

См. определение в файле im_messenger.php строка 2963

◆ GetSessionLifeTime()

GetSessionLifeTime ( )
static

См. определение в файле im_messenger.php строка 3429

◆ GetSettings()

GetSettings ( $userId = false)
static

См. определение в файле im_messenger.php строка 3403

◆ GetSonetCode()

GetSonetCode ( $user_id,
$site_id = SITE_ID )

См. определение в файле im_messenger.php строка 5157

◆ GetTelephonyAvailableLines()

GetTelephonyAvailableLines ( $userId = null)
static

См. определение в файле im_messenger.php строка 3220

◆ GetTemplateJS()

GetTemplateJS ( $arParams,
$arTemplate )
static

См. определение в файле im_messenger.php строка 3589

◆ GetUnreadCounter()

GetUnreadCounter ( $userId)
static

См. определение в файле im_messenger.php строка 3452

◆ GetV2TemplateJS()

GetV2TemplateJS ( $arResult)
static

См. определение в файле im_messenger.php строка 3844

◆ IsAdmin()

IsAdmin ( )
static

См. определение в файле im_messenger.php строка 5213

◆ IsBitrix24UserRestricted()

IsBitrix24UserRestricted ( )
static

См. определение в файле im_messenger.php строка 5196

◆ IsDesktopEnvironment()

IsDesktopEnvironment ( )
static

См. определение в файле im_messenger.php строка 3046

◆ IsEnabledMessageCheck()

IsEnabledMessageCheck ( )
static

См. определение в файле im_messenger.php строка 5191

◆ IsMobileRequest()

IsMobileRequest ( )
static

См. определение в файле im_messenger.php строка 1914

◆ IsMysqlDb()

IsMysqlDb ( )
static

См. определение в файле im_messenger.php строка 5207

◆ Like()

Like ( $id,
$action = 'auto',
$userId = null,
$byEvent = false,
$withReaction = true )
static

См. определение в файле im_messenger.php строка 2447

◆ LinesSessionVote()

LinesSessionVote ( $dialogId,
$messageId,
$action,
$userId = null )
static

См. определение в файле im_messenger.php строка 2368

◆ loadLoc()

loadLoc ( )
static

См. определение в файле im_messenger.php строка 5225

◆ needSendPush()

needSendPush ( array $arChat)
staticprotected

См. определение в файле im_messenger.php строка 5230

◆ needToSendPublicPull()

needToSendPublicPull ( ?string $chatType)
static

См. определение в файле im_messenger.php строка 5240

◆ PrepareEventForPush()

PrepareEventForPush ( $command,
$event )
static

См. определение в файле im_messenger.php строка 4739

◆ PrepareMessageForPush()

PrepareMessageForPush ( $message)
static

См. определение в файле im_messenger.php строка 4659

◆ PrepareMessageForPushIconCallBack()

PrepareMessageForPushIconCallBack ( $params)
static

См. определение в файле im_messenger.php строка 5123

◆ PrepareMessageForPushSendPutCallBack()

PrepareMessageForPushSendPutCallBack ( $params)
static

См. определение в файле im_messenger.php строка 5117

◆ PrepareParamsForPull()

PrepareParamsForPull ( $params)
static

См. определение в файле im_messenger.php строка 4290

◆ PrepareParamsForPush()

PrepareParamsForPush ( $params)
static

См. определение в файле im_messenger.php строка 4612

◆ PreparePushForChat()

PreparePushForChat ( $params)
static

См. определение в файле im_messenger.php строка 4413

◆ PreparePushForMentionInChat()

PreparePushForMentionInChat ( $params)
static

См. определение в файле im_messenger.php строка 4361

◆ PreparePushForPrivate()

PreparePushForPrivate ( $params)
static

См. определение в файле im_messenger.php строка 4510

◆ PrepareSmiles()

PrepareSmiles ( )
static

См. определение в файле im_messenger.php строка 4066

◆ SendMention()

SendMention ( $params)
static

См. определение в файле im_messenger.php строка 4103

◆ SetDesktopLastActivityDate()

SetDesktopLastActivityDate ( $timestamp,
$deviceType = IM_DESKTOP_WINDOWS,
$userId = false )
static

См. определение в файле im_messenger.php строка 3082

◆ SetDesktopStatusOffline()

SetDesktopStatusOffline ( $userId = null)
static

См. определение в файле im_messenger.php строка 3371

◆ SetDesktopStatusOnline()

SetDesktopStatusOnline ( $userId = null,
$cache = true )
static

См. определение в файле im_messenger.php строка 3299

◆ SetDesktopVersion()

SetDesktopVersion ( $version)
static

См. определение в файле im_messenger.php строка 3057

◆ Share()

Share ( $id,
$type,
$date = '' )
static

См. определение в файле im_messenger.php строка 2283

◆ SpeedFileCreate()

SpeedFileCreate ( $userID,
$value,
$type = IM_SPEED_MESSAGE )
static

См. определение в файле im_messenger.php строка 3538

◆ SpeedFileDelete()

SpeedFileDelete ( $userID,
$type = IM_SPEED_MESSAGE )
static

См. определение в файле im_messenger.php строка 3551

◆ SpeedFileExists()

SpeedFileExists ( $userID,
$type = IM_SPEED_MESSAGE )
static

См. определение в файле im_messenger.php строка 3562

◆ SpeedFileGet()

SpeedFileGet ( $userID,
$type = IM_SPEED_MESSAGE )
static

См. определение в файле im_messenger.php строка 3577

◆ StartWriting()

StartWriting ( $dialogId,
$userId = false,
$userName = "",
$byEvent = false,
$linesSilentMode = false )
static

См. определение в файле im_messenger.php строка 4026

◆ throwLegacyExceptionFromErrors()

throwLegacyExceptionFromErrors ( array $errors)
staticprotected
Аргументы
\Bitrix\Main\Error[]$errors
Возвращает
void

См. определение в файле im_messenger.php строка 5384

◆ Update()

Update ( $id,
$text,
$urlPreview = true,
$editFlag = true,
$userId = null,
$byEvent = false,
$convert = false )
static

См. определение в файле im_messenger.php строка 2020

◆ UrlAttachDelete()

UrlAttachDelete ( $id,
$attachId = false,
$userId = null )
static

См. определение в файле im_messenger.php строка 2763

Поля

◆ MESSAGE_LIMIT

const MESSAGE_LIMIT = 20000

См. определение в файле im_messenger.php строка 28


Объявления и описания членов класса находятся в файле: