mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Reduced email error messages (#16183)
fixes https://github.com/TryGhost/Team/issues/2487
This commit is contained in:
parent
4b0ca9399d
commit
17e0c0b856
@ -67,6 +67,7 @@ export default class FeatureService extends Service {
|
||||
@feature('webmentions') webmentions;
|
||||
@feature('outboundLinkTagging') outboundLinkTagging;
|
||||
@feature('webmentionEmail') webmentionEmail;
|
||||
@feature('emailErrors') emailErrors;
|
||||
|
||||
_user = null;
|
||||
|
||||
|
@ -252,6 +252,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
<h4 class="gh-expandable-title">Show email errors</h4>
|
||||
<p class="gh-expandable-description">
|
||||
This makes email errors visible in the UI.
|
||||
</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<GhFeatureFlag @flag="emailErrors" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -1,4 +1,6 @@
|
||||
const mega = require('../../../../../../services/mega');
|
||||
const labs = require('../../../../../../../shared/labs');
|
||||
const config = require('../../../../../../../shared/config');
|
||||
|
||||
module.exports = (model, frame) => {
|
||||
const jsonModel = model.toJSON ? model.toJSON(frame.options) : model;
|
||||
@ -13,5 +15,11 @@ module.exports = (model, frame) => {
|
||||
);
|
||||
});
|
||||
|
||||
if (!labs.isSet('emailErrors') && !!(config.get('bulkEmail') && config.get('bulkEmail').mailgun)) {
|
||||
if (jsonModel.status === 'failed') {
|
||||
jsonModel.status = 'submitted';
|
||||
}
|
||||
}
|
||||
|
||||
return jsonModel;
|
||||
};
|
||||
|
@ -26,7 +26,8 @@ const GA_FEATURES = [
|
||||
// NOTE: this allowlist is meant to be used to filter out any unexpected
|
||||
// input for the "labs" setting value
|
||||
const BETA_FEATURES = [
|
||||
'activitypub'
|
||||
'activitypub',
|
||||
'emailErrors'
|
||||
];
|
||||
|
||||
const ALPHA_FEATURES = [
|
||||
|
Loading…
Reference in New Issue
Block a user