Bitrix API

Sender extends Sender

Table of Contents

Constants

AVAILABLE_CONTENT_TYPES  = ['image/jpeg' => 5 * 1024 * 1024, 'image/png' => 5 * 1024 * 1024, 'audio/aac' => 16 * 1024 * 1024, 'audio/mp4' => 16 * 1024 * 1024, 'audio/amr' => 16 * 1024 * 1024, 'audio/mpeg' => 16 * 1024 * 1024, 'audio/ogg' => 16 * 1024 * 1024, 'video/mp4' => 16 * 1024 * 1024, 'video/3gpp' => 16 * 1024 * 1024]
DOCUMENT_MAX_FILE_SIZE  = 100 * 1024 * 1024

Methods

__construct()  : mixed
getMessageStatus()  : MessageStatus
isTemplateMessage()  : bool
Checks if message is HSM template by message fields.
prepareMessageBodyForSave()  : string
Converts message body text. Encodes emoji in the text, if there are any emoji.
prepareMessageBodyForSend()  : string
sendMessage()  : SendMessage

Constants

AVAILABLE_CONTENT_TYPES

public mixed AVAILABLE_CONTENT_TYPES = ['image/jpeg' => 5 * 1024 * 1024, 'image/png' => 5 * 1024 * 1024, 'audio/aac' => 16 * 1024 * 1024, 'audio/mp4' => 16 * 1024 * 1024, 'audio/amr' => 16 * 1024 * 1024, 'audio/mpeg' => 16 * 1024 * 1024, 'audio/ogg' => 16 * 1024 * 1024, 'video/mp4' => 16 * 1024 * 1024, 'video/3gpp' => 16 * 1024 * 1024]

DOCUMENT_MAX_FILE_SIZE

public mixed DOCUMENT_MAX_FILE_SIZE = 100 * 1024 * 1024

Methods

getMessageStatus()

public getMessageStatus(array<string|int, mixed> $messageFields) : MessageStatus
Parameters
$messageFields : array<string|int, mixed>
Return values
MessageStatus

isTemplateMessage()

Checks if message is HSM template by message fields.

public isTemplateMessage(array<string|int, mixed> $messageFields) : bool

We consider that it is template by mandatory text field. https://edna.docs.apiary.io/#reference/api/imouthsm

Parameters
$messageFields : array<string|int, mixed>

Message fields.

Return values
bool

prepareMessageBodyForSave()

Converts message body text. Encodes emoji in the text, if there are any emoji.

public prepareMessageBodyForSave(string $text) : string
Parameters
$text : string
Return values
string

prepareMessageBodyForSend()

public prepareMessageBodyForSend(string $text) : string
Parameters
$text : string
Return values
string

sendMessage()

public sendMessage(array<string|int, mixed> $messageFields) : SendMessage
Parameters
$messageFields : array<string|int, mixed>
Return values
SendMessage

        
On this page

Search results