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 0bd1518d5..d933ca407 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
@@ -270,7 +272,14 @@ export default class AppStore extends Store {
270 } 272 }
271 273
272 @action _openExternalUrl({ url }) { 274 @action _openExternalUrl({ url }) {
273 shell.openExternal(url); 275 const parsedUrl = new URL(url);
276 debug('open external url', parsedUrl);
277
278 if (isValidExternalURL(url)) {
279 shell.openExternal(url);
280 }
281
282 gaEvent('External URL', 'open', parsedUrl.host);
274 } 283 }
275 284
276 @action _checkForUpdates() { 285 @action _checkForUpdates() {