From 96e951821aa486c911eefde16ce544733685cfee Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 29 May 2020 13:58:09 -0700 Subject: [PATCH] Default the toast Gravatar email from app config --- packages/insomnia-app/app/ui/components/toast.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/insomnia-app/app/ui/components/toast.js b/packages/insomnia-app/app/ui/components/toast.js index d3a5ea2651..1262005e77 100644 --- a/packages/insomnia-app/app/ui/components/toast.js +++ b/packages/insomnia-app/app/ui/components/toast.js @@ -3,6 +3,7 @@ import * as React from 'react'; import * as electron from 'electron'; import autobind from 'autobind-decorator'; import classnames from 'classnames'; +import { appConfig } from '../../../config'; import GravatarImg from './gravatar-img'; import Link from './base/link'; import * as models from '../../models/index'; @@ -90,7 +91,7 @@ class Toast extends React.PureComponent { updatesNotSupported: constants.isLinux(), autoUpdatesDisabled: !settings.updateAutomatically, disableUpdateNotification: settings.disableUpdateNotification, - updateChannel: !settings.updateChannel, + updateChannel: settings.updateChannel, }; notification = await fetch.post('/notification', data, session.getCurrentSessionId()); @@ -107,6 +108,11 @@ class Toast extends React.PureComponent { return; } + // Set default properties + if (!notification.email) { + notification.email = appConfig().gravatarEmail; + } + // Remember that we've seen it const seenNotifications = this._loadSeen(); seenNotifications[notification.key] = true;