- Модуль: rpa
- Путь к файлу: ~/bitrix/modules/rpa/lib/controller/comment.php
- Класс: BitrixRpaControllerComment
- Вызов: Comment::sendMentions
protected function sendMentions(BitrixRpaModelTimeline $timeline, array $previouslyMentionedUserIds = []): void
{
$item = $timeline->getItem();
if(!$item)
{
return;
}
$uiComment = static::getUiComment();
$userSuffix = $uiComment->getUserGenderSuffix($timeline->getUserId());
$text = TruncateText(
trim(static::getCommentParser()->getText($timeline->getDescription())),
static::MAXIMUM_NOTIFICATION_COMMENT_TEXT_LENGTH
);
$message = Loc::getMessage('RPA_COMMENT_MENTION_NOTIFY'.$userSuffix, [
'#ITEM#' => ''.$item->getName().'',
'#TYPE#' => $item->getType()->getTitle(),
'#COMMENT#' => $text,
]);
$uiComment->sendMentions(
$timeline->getId(),
$timeline->getUserId(),
$timeline->getDescription(),
$message,
$previouslyMentionedUserIds
);
}