• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/update/chatindex.php
  • Класс: BitrixImopenlinesUpdateChatIndex
  • Вызов: ChatIndex::getOpenLineChatIdsWithTitles
public function getOpenLineChatIdsWithTitles(int $lastId): array
{
	$raw = BitrixImModelChatTable::query()
		->setSelect(['ID', 'TITLE'])
		->where('TYPE', BitrixImV2Chat::IM_TYPE_OPEN_LINE)
		->where('ID', '<', $lastId)
		->setLimit(self::LIMIT)
		->setOrder(['ID' => 'DESC'])
		->fetchAll()
	;
	$result = [];

	foreach ($raw as $row)
	{
		$result[(int)$row['ID']] = $row['TITLE'];
	}

	return $result;
}