PHP Class Bitrix24\Im\Chat

Inheritance: extends Bitrix24\Bitrix24Entity
Show file Open project: mesilov/bitrix24-php-sdk Class Usage Examples

Public Methods

Method Description
add ( string $title, string $description = '', string $color = '', string $message = '', array $users = [], string $avatarImgInBase64 = null, boolean $isOpen = false ) : array create new chat
delete ( integer $chatId ) : array delete chat
sendTyping ( integer $chatId ) : array send typing
setOwner ( $chatId, $userId ) : array set chat owner
updateAvatar ( integer $chatId, string $avatarImgInBase64 ) : array update avatar
updateColor ( integer $chatId, string $newColor ) : array update color
updateTitle ( integer $chatId, string $newTitle ) : array update title
userAdd ( $chatId, array $arNewUsers = [] ) : array
userDelete ( $chatId, $userId ) : array delete user from chat
userList ( $chatId ) : array get user list in chat

Method Details

add() public method

create new chat
public add ( string $title, string $description = '', string $color = '', string $message = '', array $users = [], string $avatarImgInBase64 = null, boolean $isOpen = false ) : array
$title string
$description string
$color string chat color in Bitrix24\Presets\Im\iChatColor for mobile
$message string
$users array
$avatarImgInBase64 string
$isOpen boolean
return array

delete() public method

delete chat
public delete ( integer $chatId ) : array
$chatId integer
return array

sendTyping() public method

send typing
public sendTyping ( integer $chatId ) : array
$chatId integer
return array

setOwner() public method

set chat owner
public setOwner ( $chatId, $userId ) : array
$chatId
$userId
return array

updateAvatar() public method

update avatar
public updateAvatar ( integer $chatId, string $avatarImgInBase64 ) : array
$chatId integer
$avatarImgInBase64 string
return array

updateColor() public method

update color
public updateColor ( integer $chatId, string $newColor ) : array
$chatId integer
$newColor string
return array

updateTitle() public method

update title
public updateTitle ( integer $chatId, string $newTitle ) : array
$chatId integer
$newTitle string
return array

userAdd() public method

public userAdd ( $chatId, array $arNewUsers = [] ) : array
$chatId
$arNewUsers array
return array

userDelete() public method

delete user from chat
public userDelete ( $chatId, $userId ) : array
$chatId
$userId
return array

userList() public method

get user list in chat
public userList ( $chatId ) : array
$chatId
return array