Documentation

sendMessages

public static function
\Bitrix\ImConnector\CustomConnectors::sendMessages(
   $connector,
   $line,
   $data
) 

Method for sending messages to Open Channel.

Parameters

Class Description Available from version
connector Connector ID, specified when registering a handler.
line Open channel ID
data array containing message data array, where each message is described as follows:
array(
  //User description array
  'user' => array(
     'id',//User ID in the external system *
     'last_name',//Last name
     'name',//First name
     'picture' =>
     array(
        'url'//Link to user avatar, available for the portal
     ),
     'url',//Link to user profile
     'sex',//Gender. Male and female are available
  ),
  //Array of message description
  'message' => array(
     'id', //Message ID in the external system.*
     'date', //Message date in the timestamp format.*
     'text', //Message text. Must be specified either text or files. Available formatting (BB codes) is described here: https://training.bitrix24.com/support/training/course/?COURSE_ID=115&LESSON_ID=9757&LESSON_PATH=9691.9755.9757
     'files' => array(//Array containing other array with description of files, with link available to the portal
        array('url')
     )
  ),
  //Array of chat description
  'chat' => array(
     'id',//Chat ID in the external system *
     'name', //Chat name in the external system
     'url', //Link to chat in the external system
  ),
);


© «Bitrix24», 2001-2024
Up