• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/forum/task/comment.php
  • Класс: BitrixTasksIntegrationForumTaskComment
  • Вызов: Comment::addNewAuditorsFromMentions
static function addNewAuditorsFromMentions(CTaskItem $task, array $newMentionedUserIds): void
{
	$commentPoster = CommentsTaskCommentPoster::getInstance($task->getId(), User::getId());
	if ($commentPoster)
	{
		$commentPoster->enableDeferredPostMode();
		$commentPoster->clearComments();
	}

	foreach ($newMentionedUserIds as $userId)
	{
		$task->startWatch($userId, true);
	}

	if ($commentPoster)
	{
		$commentPoster->disableDeferredPostMode();
		$commentPoster->postComments();
		$commentPoster->clearComments();
	}
}