Merge pull request #14253 from roxanneskelly/Case19446

Case 19446 - Update via Sandbox Popup -- opens Old Interface
This commit is contained in:
Howard Stearns 2018-10-24 10:02:13 -07:00 committed by GitHub
commit e61dd7dbc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -874,10 +874,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);

View file

@ -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,13 @@ 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);
}
});
}