• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_messenger.php
  • Класс: CIMMessenger
  • Вызов: CIMMessenger::PrepareMessageForPushIconCallBack
static function PrepareMessageForPushIconCallBack($params)
{
	$text = $params[1];

	$title = GetMessage('IM_MESSAGE_ICON');

	preg_match('/title=(.*[^s]])/i', $text, $match);
	if ($match)
	{
		$title = $match[1];
		if (mb_strpos($title, 'width=') !== false)
		{
			$title = mb_substr($title, 0, mb_strpos($title, 'width='));
		}
		if (mb_strpos($title, 'height=') !== false)
		{
			$title = mb_substr($title, 0, mb_strpos($title, 'height='));
		}
		if (mb_strpos($title, 'size=') !== false)
		{
			$title = mb_substr($title, 0, mb_strpos($title, 'size='));
		}
		$title = trim($title);
	}

	return '('.$title.')';
}