• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message.php
  • Класс: BitrixImV2Message
  • Вызов: Message::getUserIdsFromMention
protected function getUserIdsFromMention(): array
{
	if (isset($this->userIdsFromMention))
	{
		return $this->userIdsFromMention;
	}

	$this->userIdsFromMention = [];
	if (preg_match_all("/[USER=([0-9]+)( REPLACE)?](.*?)[/USER]/i", $this->getParsedMessage(), $matches))
	{
		foreach ($matches[1] as $userId)
		{
			$this->userIdsFromMention[(int)$userId] = (int)$userId;
		}
	}

	return $this->userIdsFromMention;
}