mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-24 15:49:08 -04:00
Default the toast Gravatar email from app config
This commit is contained in:
1 parent
6b46faa05a
commit
96e951821a
1 file changed
+7
-1
@@ -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<Props, State> {
|
||||
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<Props, State> {
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user