- Модуль: im
- Путь к файлу: ~/bitrix/modules/im/lib/call/integration/chat.php
- Класс: BitrixImCallIntegrationChat
- Вызов: Chat::toArray
public function toArray($currentUserId = 0)
{
if($currentUserId == 0)
{
$currentUserId = $this->initiatorId;
}
return [
'type' => $this->getEntityType(),
'id' => $this->getEntityId($currentUserId),
'name' => $this->getName($currentUserId),
'avatar' => $this->getAvatar($currentUserId),
'avatarColor' => $this->getAvatarColor($currentUserId),
'advanced' => [
'chatType' => $this->chatFields['type'],
'entityType' => $this->chatFields['entity_type'],
'entityId' => $this->chatFields['entity_id'],
'entityData1' => $this->chatFields['entity_data_1'],
'entityData2' => $this->chatFields['entity_data_2'],
'entityData3' => $this->chatFields['entity_data_3']
]
];
}