Update worldmap.js - for _clientheaders msg (#243)

This commit is contained in:
meeki007 2023-07-15 08:02:49 -04:00 committed by GitHub
parent d358bca8d5
commit 71940b811f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,7 +268,7 @@ module.exports = function(RED) {
message = JSON.parse(message); message = JSON.parse(message);
if (message.hasOwnProperty("action")) { if (message.hasOwnProperty("action")) {
if ((node.events.indexOf("connect")!==-1) && (message.action === "connected")) { if ((node.events.indexOf("connect")!==-1) && (message.action === "connected")) {
setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})}); setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip, _clientheaders:client.headers})});
} }
if ((node.events.indexOf("bounds")!==-1) && (message.action === "bounds")) { if ((node.events.indexOf("bounds")!==-1) && (message.action === "bounds")) {
setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})}); setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})});