mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: #5274
This commit is contained in:
@@ -123,6 +123,7 @@
|
|||||||
"maximumRelatedTopics": 0,
|
"maximumRelatedTopics": 0,
|
||||||
"disableEmailSubscriptions": 0,
|
"disableEmailSubscriptions": 0,
|
||||||
"emailConfirmInterval": 10,
|
"emailConfirmInterval": 10,
|
||||||
|
"removeEmailNotificationImages": 0,
|
||||||
"inviteExpiration": 7,
|
"inviteExpiration": 7,
|
||||||
"digestHour": 17,
|
"digestHour": 17,
|
||||||
"passwordExpiryDays": 0,
|
"passwordExpiryDays": 0,
|
||||||
|
|||||||
@@ -35,5 +35,7 @@
|
|||||||
"subscriptions": "Email Digests",
|
"subscriptions": "Email Digests",
|
||||||
"subscriptions.disable": "Disable email digests",
|
"subscriptions.disable": "Disable email digests",
|
||||||
"subscriptions.hour": "Digest Hour",
|
"subscriptions.hour": "Digest Hour",
|
||||||
"subscriptions.hour-help": "Please enter a number representing the hour to send scheduled email digests (e.g. <code>0</code> for midnight, <code>17</code> for 5:00pm). Keep in mind that this is the hour according to the server itself, and may not exactly match your system clock.<br /> The approximate server time is: <span id=\"serverTime\"></span><br /> The next daily digest is scheduled to be sent <span id=\"nextDigestTime\"></span>"
|
"subscriptions.hour-help": "Please enter a number representing the hour to send scheduled email digests (e.g. <code>0</code> for midnight, <code>17</code> for 5:00pm). Keep in mind that this is the hour according to the server itself, and may not exactly match your system clock.<br /> The approximate server time is: <span id=\"serverTime\"></span><br /> The next daily digest is scheduled to be sent <span id=\"nextDigestTime\"></span>",
|
||||||
|
"notifications.settings": "Email notification settings",
|
||||||
|
"notifications.remove-images": "Remove images from email notifications"
|
||||||
}
|
}
|
||||||
@@ -175,6 +175,9 @@ async function pushToUids(uids, notification) {
|
|||||||
notification['cta-type'] = notification.type;
|
notification['cta-type'] = notification.type;
|
||||||
}
|
}
|
||||||
let body = notification.bodyLong || '';
|
let body = notification.bodyLong || '';
|
||||||
|
if (meta.config.removeEmailNotificationImages) {
|
||||||
|
body = body.replace(/<img[^>]*>/, '');
|
||||||
|
}
|
||||||
body = posts.relativeToAbsolute(body, posts.urlRegex);
|
body = posts.relativeToAbsolute(body, posts.urlRegex);
|
||||||
body = posts.relativeToAbsolute(body, posts.imgRegex);
|
body = posts.relativeToAbsolute(body, posts.imgRegex);
|
||||||
await async.eachLimit(uids, 3, function (uid, next) {
|
await async.eachLimit(uids, 3, function (uid, next) {
|
||||||
|
|||||||
@@ -154,4 +154,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/email:notifications.settings]]</div>
|
||||||
|
<div class="col-sm-10 col-xs-12">
|
||||||
|
<form>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label for="removeEmailNotificationImages" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||||
|
<input class="mdl-switch__input" type="checkbox" id="removeEmailNotificationImages" data-field="removeEmailNotificationImages" name="removeEmailNotificationImages" />
|
||||||
|
<span class="mdl-switch__label">[[admin/settings/email:notifications.remove-images]]</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- IMPORT admin/partials/settings/footer.tpl -->
|
<!-- IMPORT admin/partials/settings/footer.tpl -->
|
||||||
|
|||||||
Reference in New Issue
Block a user