Skip to content
Snippets Groups Projects
Commit 9a0b98d0 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

#187 - Send random uuid with requests

parent 1ae4a51a
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ const WebSocket = require('ws')
const ProjectUpdate = require("./receive/project_update");
const Project = require("./project");
const PadNameUpdate = require("./receive/pad_name_update");
const uuid = require('uuid');
class ModuleInstance extends InstanceBase {
isInitialized = false
......@@ -138,7 +139,7 @@ class ModuleInstance extends InstanceBase {
sendToWebSocket(type, payload) {
this.ws.send(JSON.stringify({
'type': type,
'messageId': 'ID',
'messageId': uuid.v4(),
'payload': payload
}));
}
......
......@@ -12,6 +12,7 @@
},
"dependencies": {
"@companion-module/base": "~1.4.0",
"uuid": "^9.0.1",
"ws": "^7.2.1"
},
"devDependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment