iobroker.telegram 3.4.0 → 3.4.1
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 +3 -3
- package/admin/blockly.js +11 -11
- package/io-package.json +14 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,9 @@ Use telegram service to communicate with ioBroker
|
|
|
39
39
|
Placeholder for the next version (at the beginning of the line):
|
|
40
40
|
### **WORK IN PROGRESS**
|
|
41
41
|
-->
|
|
42
|
+
### 3.4.1 (2024-06-09)
|
|
43
|
+
* (klein0r) Blockly 9 compatibility for new ask block
|
|
44
|
+
|
|
42
45
|
### 3.4.0 (2024-06-08)
|
|
43
46
|
* (klein0r) Updated Blockly definitions
|
|
44
47
|
* (klein0r) Added Blockly block to ask questions
|
|
@@ -56,9 +59,6 @@ Use telegram service to communicate with ioBroker
|
|
|
56
59
|
* (foxriver76) Adapter supports js-controller 6 now
|
|
57
60
|
* (mcm1957) Dependencies have been updated
|
|
58
61
|
|
|
59
|
-
### 3.2.1 (2024-04-03)
|
|
60
|
-
* (PeterVoronov) An error at providing error information has been fixed.
|
|
61
|
-
|
|
62
62
|
## License
|
|
63
63
|
|
|
64
64
|
The MIT License (MIT)
|
package/admin/blockly.js
CHANGED
|
@@ -39,7 +39,7 @@ Blockly.Sendto.blocks['telegram'] =
|
|
|
39
39
|
'</block>';
|
|
40
40
|
|
|
41
41
|
Blockly.Blocks['telegram'] = {
|
|
42
|
-
init: function() {
|
|
42
|
+
init: function () {
|
|
43
43
|
const options = [[Blockly.Translate('telegram_anyInstance'), '']];
|
|
44
44
|
if (typeof main !== 'undefined' && main.instances) {
|
|
45
45
|
for (let i = 0; i < main.instances.length; i++) {
|
|
@@ -117,7 +117,7 @@ Blockly.Blocks['telegram'] = {
|
|
|
117
117
|
},
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
Blockly.JavaScript['telegram'] = function(block) {
|
|
120
|
+
Blockly.JavaScript['telegram'] = function (block) {
|
|
121
121
|
const dropdown_instance = block.getFieldValue('INSTANCE');
|
|
122
122
|
const logLevel = block.getFieldValue('LOG');
|
|
123
123
|
let value_message = Blockly.JavaScript.valueToCode(block, 'MESSAGE', Blockly.JavaScript.ORDER_ATOMIC);
|
|
@@ -175,7 +175,7 @@ Blockly.Sendto.blocks['telegram_call'] =
|
|
|
175
175
|
'</block>';
|
|
176
176
|
|
|
177
177
|
Blockly.Blocks['telegram_call'] = {
|
|
178
|
-
init: function() {
|
|
178
|
+
init: function () {
|
|
179
179
|
const options = [[Blockly.Translate('telegram_anyInstance'), '']];
|
|
180
180
|
if (typeof main !== 'undefined' && main.instances) {
|
|
181
181
|
for (let i = 0; i < main.instances.length; i++) {
|
|
@@ -340,7 +340,7 @@ Blockly.Blocks['telegram_call'] = {
|
|
|
340
340
|
},
|
|
341
341
|
};
|
|
342
342
|
|
|
343
|
-
Blockly.JavaScript['telegram_call'] = function(block) {
|
|
343
|
+
Blockly.JavaScript['telegram_call'] = function (block) {
|
|
344
344
|
const dropdown_instance = block.getFieldValue('INSTANCE');
|
|
345
345
|
const dropdown_language = block.getFieldValue('LANGUAGE');
|
|
346
346
|
const repeats = block.getFieldValue('REPEATS');
|
|
@@ -397,7 +397,7 @@ Blockly.Blocks['telegram_ask_container'] = {
|
|
|
397
397
|
* Mutator block for container.
|
|
398
398
|
* @this Blockly.Block
|
|
399
399
|
*/
|
|
400
|
-
init: function() {
|
|
400
|
+
init: function () {
|
|
401
401
|
this.setColour(Blockly.Object.HUE);
|
|
402
402
|
|
|
403
403
|
this.appendDummyInput()
|
|
@@ -415,7 +415,7 @@ Blockly.Blocks['telegram_ask_mutator'] = {
|
|
|
415
415
|
* Mutator block for add items.
|
|
416
416
|
* @this Blockly.Block
|
|
417
417
|
*/
|
|
418
|
-
init: function() {
|
|
418
|
+
init: function () {
|
|
419
419
|
this.setColour(Blockly.Sendto.HUE);
|
|
420
420
|
|
|
421
421
|
this.appendDummyInput('ANSWER')
|
|
@@ -432,7 +432,7 @@ Blockly.Blocks['telegram_ask_mutator'] = {
|
|
|
432
432
|
};
|
|
433
433
|
|
|
434
434
|
Blockly.Blocks['telegram_ask'] = {
|
|
435
|
-
init: function() {
|
|
435
|
+
init: function () {
|
|
436
436
|
this.answers_ = [];
|
|
437
437
|
this.itemCount_ = 0;
|
|
438
438
|
if (typeof Blockly.icons === 'object') {
|
|
@@ -600,7 +600,7 @@ Blockly.Blocks['telegram_ask'] = {
|
|
|
600
600
|
* @param {!Blockly.Block} containerBlock Root block in mutator.
|
|
601
601
|
* @this Blockly.Block
|
|
602
602
|
*/
|
|
603
|
-
saveConnections: function(containerBlock) {
|
|
603
|
+
saveConnections: function (containerBlock) {
|
|
604
604
|
let itemBlock = containerBlock.getInputTargetBlock('STACK');
|
|
605
605
|
let i = 0;
|
|
606
606
|
|
|
@@ -617,7 +617,7 @@ Blockly.Blocks['telegram_ask'] = {
|
|
|
617
617
|
* @private
|
|
618
618
|
* @this Blockly.Block
|
|
619
619
|
*/
|
|
620
|
-
updateShape_: function() {
|
|
620
|
+
updateShape_: function () {
|
|
621
621
|
const workspace = this.workspace;
|
|
622
622
|
|
|
623
623
|
// Add new inputs.
|
|
@@ -656,7 +656,7 @@ Blockly.Blocks['telegram_ask'] = {
|
|
|
656
656
|
},
|
|
657
657
|
};
|
|
658
658
|
|
|
659
|
-
Blockly.JavaScript
|
|
659
|
+
Blockly.JavaScript['telegram_ask'] = function(block) {
|
|
660
660
|
const answers = [];
|
|
661
661
|
for (let id = 0; id < block.itemCount_; id++) {
|
|
662
662
|
const answer = Blockly.JavaScript.valueToCode(block, 'ANSWER_' + id, Blockly.JavaScript.ORDER_ATOMIC);
|
|
@@ -689,7 +689,7 @@ Blockly.JavaScript.forBlock['telegram_ask'] = function(block) {
|
|
|
689
689
|
(value_chatid ? ` chatId: ${value_chatid},\n` : '') +
|
|
690
690
|
` reply_markup: {\n` +
|
|
691
691
|
` inline_keyboard: [\n` +
|
|
692
|
-
answers.map(a => ` [ { text: ${a.answer}, callback_data: '${a.id}' } ]
|
|
692
|
+
answers.map(a => ` [ { text: ${a.answer}, callback_data: '${a.id}' } ],`).join('\n') +
|
|
693
693
|
` ],\n` +
|
|
694
694
|
` }\n` +
|
|
695
695
|
`}, msg => {\n${logAnswer}` +
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "telegram",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.4.1": {
|
|
7
|
+
"en": "Blockly 9 compatibility for new ask block",
|
|
8
|
+
"de": "Blockly 9 Kompatibilität für neuen Frageblock",
|
|
9
|
+
"ru": "Совместимость Blockly 9 для нового блока запроса",
|
|
10
|
+
"pt": "Compatibilidade bloco 9 para novo bloco de perguntas",
|
|
11
|
+
"nl": "Blok 9 compatibiliteit voor nieuw vraagblok",
|
|
12
|
+
"fr": "Compatibilité Blockly 9 pour le nouveau bloc de demande",
|
|
13
|
+
"it": "Compatibilità Blockly 9 per nuovo blocco chiedere",
|
|
14
|
+
"es": "Bloqueo 9 compatibilidad para nuevo bloque de preguntas",
|
|
15
|
+
"pl": "Blockly 9 kompatybilność dla nowego bloku ask",
|
|
16
|
+
"uk": "Blockly 9 сумісність для нового блоку",
|
|
17
|
+
"zh-cn": "新询问块的块 9 兼容性"
|
|
18
|
+
},
|
|
6
19
|
"3.4.0": {
|
|
7
20
|
"en": "Updated Blockly definitions\nAdded Blockly block to ask questions\nRemove keyboard on answer (or timeout)",
|
|
8
21
|
"de": "Aktualisierte Blockly Definitionen\nBlockly Block hinzugefügt, um Fragen zu stellen\nEntfernen Sie die Tastatur auf der Antwort (oder Timeout)",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Adapter wymaga node.js 18 i sterownika js- > = 5 teraz\nBieżący błąd jest dodawany jako osobny błąd właściwości do obiektu odpowiedzi (messageId).\nDodano jednostki do odpowiedzi\nUaktualniono zależności0",
|
|
81
94
|
"uk": "Адаптер вимагає node.js 18 і js-controller >= 5 тепер\nПоточна помилка додана як окрема помилка власності на об'єкт відповіді (messageId) тепер.\nДодано блоки для відповіді\nЗалежність було оновлено0",
|
|
82
95
|
"zh-cn": "适配器需要节点.js 18和js控制器 QQ 现在5号\n当前错误作为单独属性错误添加到现在的响应对象(messageId)中.\n答复中增加的单位\n依赖关系已更新0"
|
|
83
|
-
},
|
|
84
|
-
"3.1.1": {
|
|
85
|
-
"en": "Added units to responses\n",
|
|
86
|
-
"de": "Einheiten zu Antworten hinzugefügt\n",
|
|
87
|
-
"ru": "Добавленные единицы к ответам\n",
|
|
88
|
-
"pt": "Unidades adicionadas a respostas\n",
|
|
89
|
-
"nl": "Toegevoegde eenheden aan antwoorden\n",
|
|
90
|
-
"fr": "Ajout d'unités aux réponses\n",
|
|
91
|
-
"it": "Unità aggiunte alle risposte\n",
|
|
92
|
-
"es": "Unidades adicionales a respuestas\n",
|
|
93
|
-
"pl": "Dodano jednostki do odpowiedzi\n",
|
|
94
|
-
"uk": "Додано блоки для відповіді\n",
|
|
95
|
-
"zh-cn": "答复中增加的单位\n"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"messages": [
|
package/package.json
CHANGED