added sending params object in handleStatus in comms.js and using params object in status event in red.js. added test for handleStatusEvent with params for comms.js

This commit is contained in:
Magdalena Lorentz
2023-11-08 11:16:09 +01:00
parent 5b5b06cc06
commit 3c67d7b9a7
3 changed files with 26 additions and 1 deletions

View File

@@ -51,6 +51,10 @@ function handleStatusEvent(event) {
fill: event.status.fill,
shape: event.status.shape
};
const params = event.status.params;
if(params && typeof params === "object" && !Array.isArray(params)){
status.params = params;
}
publish("status/"+event.id,status,true);
}
}