1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

More MQTT improvements.

This commit is contained in:
Ylian Saint-Hilaire 2019-10-07 18:11:15 -07:00
parent 2f70837ae6
commit d5f7943684
4 changed files with 31 additions and 21 deletions

View file

@ -456,6 +456,10 @@ module.exports.CreateMultiServer = function (parent, args) {
var userid, i;
//console.log('ProcessPeerServerMessage', peerServerId, msg);
switch (msg.action) {
case 'mqtt': {
if ((obj.parent.mqttbroker != null) && (msg.nodeid != null)) { obj.parent.mqttbroker.publishNoPeers(msg.nodeid, msg.topic, msg.message); } // Dispatch in the MQTT broker
break;
}
case 'bus': {
obj.parent.DispatchEvent(msg.ids, null, msg.event, true); // Dispatch the peer event
break;