Skip to content

Commit

Permalink
Send service name with message
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteinLTU committed Jul 30, 2024
1 parent 69ee491 commit ea40aee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/procedures/iotscape/iotscape-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,14 @@ IoTScapeServices.sendMessageToListeningClients = function (
if (IoTScapeDevices.getEncryptionState(service, id).cipher == "plain") {
// Send basic mode responses
clients.forEach((client) => {
client.sendMessage(type, { id, ...content });
client.sendMessage(type, { service, id, ...content });
});
}

if (type !== "device command") {
clients.forEach((client) => {
client.sendMessage("device message", {
service,
id,
message: IoTScapeDevices.deviceEncrypt(
service,
Expand Down

0 comments on commit ea40aee

Please sign in to comment.