Update file, http and email nodes to only show deprecation warning

if msg property is a real overide  to node property ( !== ).

Fix for comment by @drJeckyll  to Issue #399
This commit is contained in:
Dave C-J
2014-12-01 22:58:25 +00:00
parent e9b1e287ba
commit 5f74a1d237
3 changed files with 8 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ module.exports = function(RED) {
if (smtpTransport) {
node.status({fill:"blue",shape:"dot",text:"sending"});
var payload = RED.util.ensureString(msg.payload);
if (msg.to && node.name) {
if (msg.to && node.name && (msg.to !== node.name)) {
node.warn("Deprecated: msg properties should not override set node properties. See bit.ly/nr-override-msg-props");
}
smtpTransport.sendMail({