From be54fb1534f20ff0cc622ff2e7f8734a5fc22752 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 10 May 2019 11:36:53 -0400 Subject: tried to explore desktop push, did not work --- www/js/EventServer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'www/js') diff --git a/www/js/EventServer.js b/www/js/EventServer.js index 6343cd0a..7dcb6937 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -520,10 +520,11 @@ angular.module('zmApp.controllers') var media; var ld = NVR.getLogin(); - var plat = $ionicPlatform.is('ios') ? 'ios' : 'android'; + //var plat = $ionicPlatform.is('ios') ? 'ios' : 'android'; + var plat = $rootScope.platformOS; if ($rootScope.platformOS == 'desktop') { - NVR.log("Desktop instance, not setting up push. Websockets only, I hope"); + NVR.log ('Not setting up push as this is desktop.'); return; } @@ -573,7 +574,7 @@ angular.module('zmApp.controllers') NVR.debug("EventSever: Push Notification registration ID received: " + JSON.stringify(data)); $rootScope.apnsToken = data.registrationId; - var plat = $ionicPlatform.is('ios') ? 'ios' : 'android'; + var plat = $rootScope.platformOS; var ld = NVR.getLogin(); var pushstate = "enabled"; if (ld.disablePush == true) -- cgit v1.2.3