From 069a47f35a700d4da7646b58a3bf1283caab3248 Mon Sep 17 00:00:00 2001 From: Anna Thomas Date: Mon, 3 Nov 2014 13:41:45 +0000 Subject: [PATCH] Added node warnings when message properties override set node properties --- nodes/core/io/21-httpin.html | 7 +++---- nodes/core/io/21-httpin.js | 19 +++++++++++++++---- nodes/core/social/61-email.html | 2 +- nodes/core/social/61-email.js | 5 ++++- nodes/core/storage/50-file.html | 4 ++-- nodes/core/storage/50-file.js | 22 +++++++++++++++++++--- 6 files changed, 44 insertions(+), 15 deletions(-) diff --git a/nodes/core/io/21-httpin.html b/nodes/core/io/21-httpin.html index 059b8596e..f872a938a 100644 --- a/nodes/core/io/21-httpin.html +++ b/nodes/core/io/21-httpin.html @@ -118,8 +118,7 @@ diff --git a/nodes/core/social/61-email.js b/nodes/core/social/61-email.js index 7d0f8cb93..74d24d6ab 100644 --- a/nodes/core/social/61-email.js +++ b/nodes/core/social/61-email.js @@ -72,6 +72,9 @@ 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) { + node.warn("Deprecated: msg properties should not override set node properties. See bit.ly/nr-override-msg-props"); + } smtpTransport.sendMail({ from: node.userid, // sender address to: msg.to || node.name, // comma separated list of addressees @@ -243,4 +246,4 @@ module.exports = function(RED) { global: { type:"boolean"} } }); -} +}; diff --git a/nodes/core/storage/50-file.html b/nodes/core/storage/50-file.html index 5113a17db..e85c87604 100644 --- a/nodes/core/storage/50-file.html +++ b/nodes/core/storage/50-file.html @@ -37,7 +37,7 @@