1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

rename 'send' to 'reply' to not collide with internal node function names, a config node has no wires so the 'send' function gets overwritten with a noop (nodes/red/Node.js:42, introduced in 57ae297)

This commit is contained in:
dansu 2015-01-13 08:48:59 +01:00
parent 2066d53d3f
commit 9f91493cd1

View File

@ -125,7 +125,7 @@ module.exports = function(RED) {
} }
} }
WebSocketListenerNode.prototype.send = function(id,data) { WebSocketListenerNode.prototype.reply = function(id,data) {
var session = this._clients[id]; var session = this._clients[id];
if (session) { if (session) {
try { try {
@ -171,7 +171,7 @@ module.exports = function(RED) {
} }
} }
if (msg._session && msg._session.type == "websocket") { if (msg._session && msg._session.type == "websocket") {
node.serverConfig.send(msg._session.id,payload); node.serverConfig.reply(msg._session.id,payload);
} else { } else {
node.serverConfig.broadcast(payload,function(error){ node.serverConfig.broadcast(payload,function(error){
if (!!error) { if (!!error) {