This commit is contained in:
Barış Soner Uşaklı
2017-12-29 13:27:07 -05:00
parent e563e8ac82
commit 2661a31227
2 changed files with 3 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ function pushToUids(uids, notification, callback) {
async.eachLimit(uids, 3, function (uid, next) {
emailer.send('notification', uid, {
path: notification.path,
subject: '[[notifications:new_notification_from, ' + meta.config.title + ']]',
subject: notification.subject || '[[notifications:new_notification_from, ' + meta.config.title + ']]',
intro: utils.stripHTMLTags(notification.bodyShort),
body: utils.stripHTMLTags(notification.bodyLong || ''),
showUnsubscribe: true,

View File

@@ -9,6 +9,7 @@ var notifications = require('../notifications');
var privileges = require('../privileges');
var plugins = require('../plugins');
var utils = require('../utils');
var meta = require('../meta');
module.exports = function (Topics) {
Topics.toggleFollow = function (tid, uid, callback) {
@@ -219,6 +220,7 @@ module.exports = function (Topics) {
notifications.create({
type: 'new-reply',
subject: '[' + (meta.config.title || 'NodeBB') + '] ' + title,
bodyShort: '[[notifications:user_posted_to, ' + postData.user.username + ', ' + titleEscaped + ']]',
bodyLong: postData.content,
pid: postData.pid,