From 7fddd22ff3abbbf893ca49fda74584c4c448dfd7 Mon Sep 17 00:00:00 2001 From: Alsotang Date: Wed, 23 Apr 2014 11:29:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=82=AE=E4=BB=B6=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/user.js | 6 ------ services/mail.js | 7 ++++++- views/user/setting.html | 21 --------------------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/controllers/user.js b/controllers/user.js index d0d2efa..d4ab41e 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -120,8 +120,6 @@ exports.setting = function (req, res, next) { profile: data.profile, weibo: data.weibo, githubUsername: data.github || data.githubUsername, - receive_at_mail: data.receive_at_mail, - receive_reply_mail: data.receive_reply_mail }; if (isSuccess) { data2.success = msg; @@ -157,8 +155,6 @@ exports.setting = function (req, res, next) { if (github.indexOf('@') === 0) { github = github.slice(1); } - var receive_at_mail = req.body.receive_at_mail === 'on'; - var receive_reply_mail = req.body.receive_reply_mail === 'on'; if (url !== '') { try { @@ -194,8 +190,6 @@ exports.setting = function (req, res, next) { user.profile = profile; user.weibo = weibo; user.githubUsername = github; - user.receive_at_mail = receive_at_mail; - user.receive_reply_mail = receive_reply_mail; user.save(function (err) { if (err) { return next(err); diff --git a/services/mail.js b/services/mail.js index 4b08da0..77e29c8 100644 --- a/services/mail.js +++ b/services/mail.js @@ -81,6 +81,8 @@ exports.sendResetPassMail = function (who, token, name) { * @param {Object} msg 发送的消息对象 */ exports.sendReplyMail = function (who, msg) { + return; // !!!关闭发送通知邮件 + var from = util.format('%s <%s>', config.name, config.mail_opts.auth.user); var to = who; var subject = config.name + ' 新消息'; @@ -110,10 +112,13 @@ exports.sendReplyMail = function (who, msg) { * @param {Object} msg 发送的消息对象 */ exports.sendAtMail = function (who, msg) { + return; // !!!关闭发送at通知邮件 + + if (!msg.topic || !msg.reply) { return; } - + var from = util.format('%s <%s>', config.name, config.mail_opts.auth.user); var to = who; var subject = config.name + ' 新消息'; diff --git a/views/user/setting.html b/views/user/setting.html index 1d5cb26..67173f6 100644 --- a/views/user/setting.html +++ b/views/user/setting.html @@ -96,27 +96,6 @@ <% } %> -
- -
- - -
-