aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 168aa7e48..f9009af5a 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -8,6 +8,7 @@ import { getDoNotDisturb } from '@meetfranz/electron-notification-state';
8import AutoLaunch from 'auto-launch'; 8import AutoLaunch from 'auto-launch';
9import prettyBytes from 'pretty-bytes'; 9import prettyBytes from 'pretty-bytes';
10import ms from 'ms'; 10import ms from 'ms';
11import { URL } from 'url';
11 12
12import Store from './lib/Store'; 13import Store from './lib/Store';
13import Request from './lib/Request'; 14import Request from './lib/Request';
@@ -19,6 +20,7 @@ import { onVisibilityChange } from '../helpers/visibility-helper';
19import { getLocale } from '../helpers/i18n-helpers'; 20import { getLocale } from '../helpers/i18n-helpers';
20 21
21import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js'; 22import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js';
23import { isValidExternalURL } from '../helpers/url-helpers';
22 24
23const debug = require('debug')('Franz:AppStore'); 25const debug = require('debug')('Franz:AppStore');
24 26
@@ -256,7 +258,14 @@ export default class AppStore extends Store {
256 } 258 }
257 259
258 @action _openExternalUrl({ url }) { 260 @action _openExternalUrl({ url }) {
259 shell.openExternal(url); 261 const parsedUrl = new URL(url);
262 debug('open external url', parsedUrl);
263
264 if (isValidExternalURL(url)) {
265 shell.openExternal(url);
266 }
267
268 gaEvent('External URL', 'open', parsedUrl.host);
260 } 269 }
261 270
262 @action _checkForUpdates() { 271 @action _checkForUpdates() {