• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_chat.php
  • Класс: CIMChat
  • Вызов: CIMChat::fillChatIndexWithUserFullNames
static function fillChatIndexWithUserFullNames(BitrixImInternalsChatIndex $index)
{
	$query =
		BitrixImModelRelationTable::query()
			->addSelect('USER_ID')
			->where('CHAT_ID', $index->getChatId())
			->setLimit(100)
	;

	$users = [];
	foreach ($query->exec() as $relation)
	{
		$users[] = BitrixImUser::getInstance($relation['USER_ID'])->getFullName(false);
	}

	$index->setUserList($users);
}