mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00: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:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user