iobroker.sayit 4.0.3 → 4.0.4
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 +1 -1
- package/io-package.json +2 -2
- package/main.js +12 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -267,7 +267,7 @@ The following values for engines are possible:
|
|
|
267
267
|
### **WORK IN PROGRESS**
|
|
268
268
|
-->
|
|
269
269
|
## Changelog
|
|
270
|
-
### 4.0.
|
|
270
|
+
### 4.0.4 (2024-07-11)
|
|
271
271
|
* (bluefox) Packages updated
|
|
272
272
|
* (bluefox) Corrected playing in vis
|
|
273
273
|
* (bluefox) Corrected blockly
|
package/io-package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "sayit",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.4",
|
|
5
5
|
"news": {
|
|
6
|
-
"4.0.
|
|
6
|
+
"4.0.4": {
|
|
7
7
|
"en": "Packages updated\nCorrected playing in vis\nCorrected blockly",
|
|
8
8
|
"de": "Pakete aktualisiert\nKorrigiertes Spielen in Vis\nBlockiert korrigiert",
|
|
9
9
|
"ru": "Обновленные пакеты\nИсправленная игра в vis\nИсправлено блокно",
|
package/main.js
CHANGED
|
@@ -103,18 +103,22 @@ function startAdapter(options) {
|
|
|
103
103
|
function processMessage(obj) {
|
|
104
104
|
if (obj) {
|
|
105
105
|
if (obj.command === 'say') {
|
|
106
|
-
const text = obj.message
|
|
106
|
+
const text = obj.message?.text;
|
|
107
107
|
const language = obj.message?.language;
|
|
108
108
|
const volume = obj.message?.volume;
|
|
109
109
|
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
if (text) {
|
|
111
|
+
if (obj.callback) {
|
|
112
|
+
const opts = {...obj.message};
|
|
113
|
+
opts.callback = error => {
|
|
114
|
+
adapter.sendTo(obj.from, obj.command, {error, result: error ? undefined : 'Ok'}, obj.callback);
|
|
115
|
+
};
|
|
116
|
+
addToQueue(text, language, volume, null, opts);
|
|
117
|
+
} else {
|
|
118
|
+
addToQueue(text, language, volume);
|
|
119
|
+
}
|
|
116
120
|
} else {
|
|
117
|
-
|
|
121
|
+
adapter.sendTo(obj.from, obj.command, {error : 'No text'}, obj.callback);
|
|
118
122
|
}
|
|
119
123
|
} else if (obj.command === 'stopInstance') {
|
|
120
124
|
stop(false, () =>
|