Documentation

updateMessages

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

Method for updating messages in Open Channel.

Parameters

Class Description Available from version
connector Connector ID, specified when registering the handler.
line Open channel ID
data Array containing other message arrays with each message described as follows:
array(
  //Array of user description
  '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 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