- Модуль: im
- Путь к файлу: ~/bitrix/modules/im/lib/V2/Message/Reaction/ReactionService.php
- Класс: BitrixImV2MessageReactionReactionService
- Вызов: ReactionService::getTextNotification
private function getTextNotification(ReactionItem $reaction): string
{
$genderModifier = "_{$this->getContext()->getUser()->getGender()}";
$chat = Chat::getInstance($reaction->getChatId())->withContext($this->context);
$code = "IM_MESSAGE_REACTION{$genderModifier}";
if ($chat instanceof ChatPrivateChat)
{
return Loc::getMessage("{$code}_PRIVATE", [
'#DIALOG_ID#' => $chat->getDialogContextId(),
'#MESSAGE_ID#' => $this->message->getMessageId(),
'#QOUTED_MESSAGE#' => $this->message->getForPush(),
'#REACTION_NAME#' => $reaction->getLocName(),
]);
}
return Loc::getMessage($code, [
'#DIALOG_ID#' => $chat->getDialogContextId(),
'#MESSAGE_ID#' => $this->message->getMessageId(),
'#QOUTED_MESSAGE#' => $this->message->getForPush(),
'#CHAT_ID#' => $this->message->getChatId(),
'#CHAT_TITLE#' => $chat->getTitle(),
'#REACTION_NAME#' => $reaction->getLocName(),
]);
}