@tiledesk/tiledesk-tybot-connector 2.0.12-rc2 → 2.0.12-rc4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -402,8 +402,14 @@ router.post('/block/:project_id/:bot_id/:block_id', async (req, res) => {
402
402
 
403
403
  // invoke block
404
404
  // unique ID for each execution
405
- const execution_id = uuidv4().replace(/-/g, '');
406
- const request_id = "automation-request-" + project_id + "-" + execution_id;
405
+ let request_id;
406
+ if (body.preloaded_request_id) {
407
+ request_id = body.preloaded_request_id;
408
+ } else {
409
+ const execution_id = uuidv4().replace(/-/g, '');
410
+ request_id = "automation-request-" + project_id + "-" + execution_id;
411
+
412
+ }
407
413
  const command = "/#" + block_id;
408
414
  let message = {
409
415
  payload: {