• Модуль: mail
  • Путь к файлу: ~/bitrix/modules/mail/lib/integration/im/notification.php
  • Класс: BitrixMailIntegrationImNotification
  • Вызов: Notification::getNotifyMessageForNewMessageInMail
static function getNotifyMessageForNewMessageInMail($message, $absoluteUrl = false): string
{
	$url = htmlspecialcharsbx($message['__href']);

	if ($absoluteUrl)
	{
		$uri = new Uri($url);
		$url = $uri->toAbsolute()->getLocator();
	}

	if ($message['SUBJECT'])
	{
		return Loc::getMessage('MAIL_NOTIFY_NEW_SINGLE_MESSAGE_IN_MAIL_CLIENT_1',
			[
				'#SUBJECT#' => $message['SUBJECT'],
				'#VIEW_URL#' => $url,
			]
		);
	}
	else
	{
		return Loc::getMessage('MAIL_NOTIFY_NEW_SINGLE_MESSAGE_IN_MAIL_CLIENT_EMPTY_SUBJECT',
			[
				'#VIEW_URL#' => $url,
			]
		);
	}
}