From 91f92276864161e9ea93f73014b371b663a1d0b6 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Mon, 22 Oct 2018 15:44:16 -0700 Subject: [PATCH] Case 19446 - Update via Sandbox Popup -- opens Old Interface --- server-console/src/main.js | 4 ---- server-console/src/modules/hf-notifications.js | 12 ++++++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/server-console/src/main.js b/server-console/src/main.js index 5c7913d775..0263f8fd65 100644 --- a/server-console/src/main.js +++ b/server-console/src/main.js @@ -877,10 +877,6 @@ function onContentLoaded() { hasShownUpdateNotification = true; } }); - notifier.on('click', function(notifierObject, options) { - log.debug("Got click", options.url); - shell.openExternal(options.url); - }); } deleteOldFiles(logPath, DELETE_LOG_FILES_OLDER_THAN_X_SECONDS, LOG_FILE_REGEX); diff --git a/server-console/src/modules/hf-notifications.js b/server-console/src/modules/hf-notifications.js index b1f337bbc3..e1ea508e47 100644 --- a/server-console/src/modules/hf-notifications.js +++ b/server-console/src/modules/hf-notifications.js @@ -5,6 +5,8 @@ const process = require('process'); const hfApp = require('./hf-app'); const path = require('path'); const AccountInfo = require('./hf-acctinfo').AccountInfo; +const url = require('url'); +const shell = require('electron').shell; const GetBuildInfo = hfApp.getBuildInfo; const buildInfo = GetBuildInfo(); const osType = os.type(); @@ -154,8 +156,14 @@ function HifiNotifications(config, menuNotificationCallback) { var _menuNotificationCallback = menuNotificationCallback; notifier.on('click', function (notifierObject, options) { - StartInterface(options.url); - _menuNotificationCallback(options.notificationType, false); + const optUrl = url.parse(options.url); + if ((optUrl.protocol === "hifi") || (optUrl.protocol === "hifiapp")) { + StartInterface(options.url); + _menuNotificationCallback(options.notificationType, false); + } + else { + shell.openExternal(options.url); + } }); }