mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Reduced email error messages (#16183)
fixes https://github.com/TryGhost/Team/issues/2487
This commit is contained in:
parent
27619dd8a7
commit
fc990e856a
4 changed files with 24 additions and 1 deletions
|
@ -66,6 +66,7 @@ export default class FeatureService extends Service {
|
|||
@feature('emailStability') emailStability;
|
||||
@feature('webmentions') webmentions;
|
||||
@feature('outboundLinkTagging') outboundLinkTagging;
|
||||
@feature('emailErrors') emailErrors;
|
||||
|
||||
_user = null;
|
||||
|
||||
|
|
|
@ -239,6 +239,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…
Add table
Reference in a new issue