@5minds/node-red-contrib-processcube 1.3.2-feature-cd2ad8-m220118e → 1.3.2-feature-a99d33-m24jmsi2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.3.2-feature-cd2ad8-m220118e",
3
+ "version": "1.3.2-feature-a99d33-m24jmsi2",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -30,6 +30,9 @@ module.exports = function (RED) {
30
30
  const matchingFlowNodes = await client.userTasks.query(newQuery, { identity: currentIdentity });
31
31
 
32
32
  if (matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
33
+ // remove subscription
34
+ client.userTasks.removeSubscription(subscription, currentIdentity);
35
+
33
36
  const userTask = matchingFlowNodes.userTasks[0];
34
37
 
35
38
  msg.payload = { userTask: userTask };
@@ -38,8 +41,6 @@ module.exports = function (RED) {
38
41
  // nothing todo - wait for next notification
39
42
  }
40
43
 
41
- // remove subscription
42
- client.userTasks.removeSubscription(subscription, currentIdentity);
43
44
  }, { identity: currentIdentity });
44
45
 
45
46
  node.log({"Handling old userTasks config.only_for_new": config.only_for_new});