• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/im/notification/task/instantnotification.php
  • Класс: BitrixTasksIntegrationIMNotificationTaskInstantNotification
  • Вызов: InstantNotification::getMessage
public function getMessage(): string
{
	$search = [];
	$replace = [];

	foreach($this->notification->getTemplates() as $template)
	{
		$search[] = $template->getSearch();
		$replace[] = $template->getReplace();
	}

	$preparedMessage = str_replace(
		$search,
		$replace,
		$this->notification->getGenderMessage()
	);

	$link = new Link(
		$this->notification->getTask(),
		$this->notification->getRecepient(),
		Link::MODE_BBCODE,
		$this->notification->getMessage()->getMetaData()->getCommentId()
	);

	return $link->placeLinkAnchor($preparedMessage);
}