@iobroker/socket-classes 0.1.10 → 0.2.0

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/README.md CHANGED
@@ -69,6 +69,9 @@ io.close();
69
69
  -->
70
70
 
71
71
  ## Changelog
72
+ ### 0.2.0 (2022-05-09)
73
+ * (bluefox) fixed `delObjects` command
74
+
72
75
  ### 0.1.10 (2022-05-09)
73
76
  * (bluefox) Added support for fileChanges
74
77
 
@@ -1071,7 +1071,19 @@ class SocketCommandsAdmin extends SocketCommands {
1071
1071
  options = {};
1072
1072
  }
1073
1073
  options.user = socket._acl.user;
1074
- options.recursive = true;
1074
+ // options.recursive = true; // the only difference between delObject and delObjects is this line
1075
+ this.adapter.delForeignObject(id, options, (err, ...args) =>
1076
+ SocketCommands._fixCallback(callback, err, ...args));
1077
+ }
1078
+ };
1079
+
1080
+ this.commands['delObjects'] = (socket, id, options, callback) => {
1081
+ if (this._checkPermissions(socket, 'delObject', callback, id)) {
1082
+ if (!options || typeof options !== 'object') {
1083
+ options = {};
1084
+ }
1085
+ options.user = socket._acl.user;
1086
+ options.recursive = true; // the only difference between delObject and delObjects is this line
1075
1087
  this.adapter.delForeignObject(id, options, (err, ...args) =>
1076
1088
  SocketCommands._fixCallback(callback, err, ...args));
1077
1089
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/socket-classes",
3
- "version": "0.1.10",
3
+ "version": "0.2.0",
4
4
  "description": "ioBroker server-side web sockets",
5
5
  "author": {
6
6
  "name": "bluefox",