Merge remote-tracking branch 'refs/remotes/origin/master' into develop

This commit is contained in:
Barış Soner Uşaklı
2018-01-31 13:48:50 -05:00
6 changed files with 12 additions and 11 deletions

View File

@@ -292,13 +292,7 @@ module.exports = function (Groups) {
async.each(groups, function (groupName, next) {
async.parallel([
function (next) {
Groups.isMember(uid, groupName, function (err, isMember) {
if (!err && isMember) {
Groups.leave(groupName, uid, next);
} else {
next();
}
});
Groups.leave(groupName, uid, next);
},
function (next) {
Groups.rejectMembership(groupName, uid, next);

View File

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