• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/call/integration/chat.php
  • Класс: BitrixImCallIntegrationChat
  • Вызов: Chat::getAvatarColor
public function getAvatarColor($currentUserId)
{
	if(!$this->chatFields)
	{
		return false;
	}

	if($this->chatFields['message_type'] === IM_MESSAGE_PRIVATE && count($this->chatUsers) === 2)
	{
		return BitrixImUser::getInstance($this->getEntityId($currentUserId))->getColor();
	}
	if($this->chatFields['message_type'] !== IM_MESSAGE_PRIVATE)
	{
		return $this->chatFields['color'];
	}

	return false;
}