• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/mobilecounter.php
  • Класс: BitrixPullMobileCounter
  • Вызов: MobileCounter::send
static function send($userId = null, $appId = self::MOBILE_APP)
{
	if (is_null($userId) && is_object($GLOBALS['USER']))
	{
		$userId = $GLOBALS['USER']->getId();
	}

	$userId = intval($userId);
	if ($userId <= 0)
	{
		return false;
	}

	BitrixPullPush::add($userId, Array(
		'module_id' => 'pull',
		'push' => Array('badge' => 'Y')
	));

	return true;
}