iobroker.telegram 1.12.2 → 1.12.5

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
@@ -706,6 +706,15 @@ Before sending it to `telegram.INSTANCE.communicate.responseJson you need to str
706
706
  -->
707
707
 
708
708
  ## Changelog
709
+ ### 1.12.5 (2022-04-19)
710
+ * (Apollon77) Fix crash cases reported by Sentry
711
+
712
+ ### 1.12.4 (2022-04-19)
713
+ * (Apollon77) Fix crash cases reported by Sentry
714
+
715
+ ### 1.12.3 (2022-04-19)
716
+ * (Apollon77) Make sure also not set states can be queried - will return "State not set" in this case!
717
+
709
718
  ### 1.12.2 (2022-04-01)
710
719
  * (Apollon77) Fix crash cases reported by Sentry
711
720
 
package/io-package.json CHANGED
@@ -1,8 +1,44 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "telegram",
4
- "version": "1.12.2",
4
+ "version": "1.12.5",
5
5
  "news": {
6
+ "1.12.5": {
7
+ "en": "Fix crash cases reported by Sentry",
8
+ "de": "Von Sentry gemeldete Absturzfälle beheben",
9
+ "ru": "Исправить случаи сбоев, о которых сообщил Sentry",
10
+ "pt": "Corrigir casos de travamento relatados pelo Sentinela",
11
+ "nl": "Herstel crashgevallen gemeld door Sentry",
12
+ "fr": "Correction des cas de plantage signalés par Sentry",
13
+ "it": "Risolvi i casi di crash segnalati da Sentry",
14
+ "es": "Solucionar casos de fallas informados por Sentry",
15
+ "pl": "Napraw przypadki awarii zgłoszone przez Sentry",
16
+ "zh-cn": "修复 Sentry 报告的崩溃案例"
17
+ },
18
+ "1.12.4": {
19
+ "en": "Fix crash cases reported by Sentry",
20
+ "de": "Von Sentry gemeldete Absturzfälle beheben",
21
+ "ru": "Исправить случаи сбоев, о которых сообщил Sentry",
22
+ "pt": "Corrigir casos de travamento relatados pelo Sentinela",
23
+ "nl": "Herstel crashgevallen gemeld door Sentry",
24
+ "fr": "Correction des cas de plantage signalés par Sentry",
25
+ "it": "Risolvi i casi di crash segnalati da Sentry",
26
+ "es": "Solucionar casos de fallas informados por Sentry",
27
+ "pl": "Napraw przypadki awarii zgłoszone przez Sentry",
28
+ "zh-cn": "修复 Sentry 报告的崩溃案例"
29
+ },
30
+ "1.12.3": {
31
+ "en": "Make sure also not set states can be queried - will return \"State not set\" in this case!",
32
+ "de": "Stellen Sie sicher, dass auch nicht gesetzte Zustände abgefragt werden können - in diesem Fall wird \"Zustand nicht gesetzt\" zurückgegeben!",
33
+ "ru": "Убедитесь, что также можно запросить неустановленные состояния - в этом случае будет возвращено «Состояние не установлено»!",
34
+ "pt": "Certifique-se também de que os estados não definidos podem ser consultados - retornará \"Estado não definido\" neste caso!",
35
+ "nl": "Zorg ervoor dat ook niet-ingestelde staten kunnen worden opgevraagd - in dit geval wordt \"Status niet ingesteld\" geretourneerd!",
36
+ "fr": "Assurez-vous également que les états non définis peuvent être interrogés - renverra \"State not set\" dans ce cas !",
37
+ "it": "Assicurati che anche gli stati non impostati possano essere interrogati - in questo caso restituirà \"Stato non impostato\"!",
38
+ "es": "Asegúrese de que también se puedan consultar los estados no establecidos; ¡devolverá \"Estado no establecido\" en este caso!",
39
+ "pl": "Upewnij się, że również nieustawione stany mogą być odpytywane - w tym przypadku zwróci \"State not set\"!",
40
+ "zh-cn": "确保也可以查询未设置的状态 - 在这种情况下将返回“未设置状态”!"
41
+ },
6
42
  "1.12.2": {
7
43
  "en": "Fix crash cases reported by Sentry",
8
44
  "de": "Von Sentry gemeldete Absturzfälle beheben",
@@ -50,42 +86,6 @@
50
86
  "es": "Protección de fuerza bruta agregada\nExtendido en bloques con la opción `disable_web_preview`\nSe agregó el estado `communicate.responseSilent` para responder en silencio.",
51
87
  "pl": "Dodano ochronę przed bruteforce\nRozszerzony blokowo z opcją `disable_web_preview`\ndodano stan `communicate.responseSilent` do cichej odpowiedzi",
52
88
  "zh-cn": "添加了蛮力保护\n使用 `disable_web_preview` 选项扩展块\n添加了`communicate.responseSilent`状态以静默回答"
53
- },
54
- "1.10.1": {
55
- "en": "Updated telegram library",
56
- "de": "Aktualisierte Telegrammbibliothek",
57
- "ru": "Обновлена библиотека телеграмм.",
58
- "pt": "Biblioteca de telegramas atualizada",
59
- "nl": "Bijgewerkte telegrambibliotheek",
60
- "fr": "Bibliothèque de télégrammes mise à jour",
61
- "it": "Libreria di telegrammi aggiornata",
62
- "es": "Biblioteca de telegramas actualizada",
63
- "pl": "Zaktualizowana biblioteka telegramów",
64
- "zh-cn": "更新的电报库"
65
- },
66
- "1.10.0": {
67
- "en": "Add botSendRaw state to allow processing of the RAW data send by bot\nAdd tier for js-controller 3.3\nFixed the control of the states",
68
- "de": "Fügen Sie den botSendRaw-Status hinzu, um die Verarbeitung der vom Bot gesendeten RAW-Daten zu ermöglichen\nStufe für js-controller 3.3 . hinzufügen\nDie Kontrolle der Zustände wurde behoben",
69
- "ru": "Добавьте состояние botSendRaw, чтобы разрешить обработку RAW-данных, отправленных ботом\nДобавить уровень для js-controller 3.3\nИсправлен контроль состояний",
70
- "pt": "Adicione o estado botSendRaw para permitir o processamento dos dados RAW enviados por bot\nAdicionar camada para js-controller 3.3\nCorrigido o controle dos estados",
71
- "nl": "Voeg botSendRaw-status toe om verwerking van de RAW-gegevens die door bot zijn verzonden toe te staan\nLaag toevoegen voor js-controller 3.3\nDe controle over de staten opgelost Fixed",
72
- "fr": "Ajouter l'état botSendRaw pour permettre le traitement des données RAW envoyées par le bot\nAjouter un niveau pour js-controller 3.3\nCorrection du contrôle des états",
73
- "it": "Aggiungi lo stato botSendRaw per consentire l'elaborazione dei dati RAW inviati dal bot\nAggiungi livello per js-controller 3.3\nRisolto il controllo degli stati",
74
- "es": "Agregue el estado botSendRaw para permitir el procesamiento de los datos RAW enviados por bot\nAgregar nivel para js-controller 3.3\nArreglado el control de los estados.",
75
- "pl": "Dodaj stan botSendRaw, aby umożliwić przetwarzanie danych RAW wysyłanych przez bota\nDodaj warstwę dla kontrolera js 3.3\nPoprawiono kontrolę stanów",
76
- "zh-cn": "添加 botSendRaw 状态以允许处理 bot 发送的 RAW 数据\n为 js-controller 3.3 添加层\n修复了对状态的控制"
77
- },
78
- "1.9.0": {
79
- "en": "Added the option to not authenticate the new users\nAdded the option to disable system messages for specific users",
80
- "de": "Option hinzugefügt, die neuen Benutzer nicht zu authentifizieren\nOption zum Deaktivieren von Systemnachrichten für bestimmte Benutzer hinzugefügt",
81
- "ru": "Добавлена возможность не аутентифицировать новых пользователей\nДобавлена возможность отключить системные сообщения для определенных пользователей",
82
- "pt": "Adicionada a opção de não autenticar os novos usuários\nAdicionada a opção de desativar mensagens do sistema para usuários específicos",
83
- "nl": "De optie toegevoegd om de nieuwe gebruikers niet te authenticeren\nDe optie toegevoegd om systeemberichten voor specifieke gebruikers uit te schakelen",
84
- "fr": "Ajout de l'option pour ne pas authentifier les nouveaux utilisateurs\nAjout de l'option pour désactiver les messages système pour des utilisateurs spécifiques",
85
- "it": "Aggiunta l'opzione per non autenticare i nuovi utenti\nAggiunta l'opzione per disabilitare i messaggi di sistema per utenti specifici",
86
- "es": "Añadida la opción de no autenticar a los nuevos usuarios.\nSe agregó la opción para deshabilitar los mensajes del sistema para usuarios específicos.",
87
- "pl": "Dodano opcję, aby nie uwierzytelniać nowych użytkowników\nDodano opcję wyłączenia wiadomości systemowych dla określonych użytkowników",
88
- "zh-cn": "添加了不对新用户进行身份验证的选项\n添加了禁用特定用户的系统消息的选项"
89
89
  }
90
90
  },
91
91
  "title": "Telegram",
package/main.js CHANGED
@@ -224,7 +224,7 @@ function startAdapter(options) {
224
224
  `You can call in shell following scrip to allow it for node.js: "iobroker fix"`
225
225
  );
226
226
  } else {
227
- adapter.log.error(`Cannot start server on ${settings.bind || '0.0.0.0'}:${serverPort}: ${e}`);
227
+ adapter.log.error(`Cannot start server on ${adapter.config.bind || '0.0.0.0'}:${serverPort}: ${e}`);
228
228
  }
229
229
  if (!serverListening) {
230
230
  adapter.terminate ? adapter.terminate(utils.EXIT_CODES.ADAPTER_REQUESTED_TERMINATION) : process.exit(utils.EXIT_CODES.ADAPTER_REQUESTED_TERMINATION);
@@ -294,7 +294,7 @@ function startAdapter(options) {
294
294
  if (!state.ack) {
295
295
  if (id.endsWith('communicate.response')) {
296
296
  if (typeof state.val === 'object') {
297
- adapter.log.error(`communicate.response only supports passing a message to send as string. You provided ${JSON.stringofy(state.val)}. Please use "communicate.responseJson" instead with a stringified JSON object!`);
297
+ adapter.log.error(`communicate.response only supports passing a message to send as string. You provided ${JSON.stringify(state.val)}. Please use "communicate.responseJson" instead with a stringified JSON object!`);
298
298
  return;
299
299
  }
300
300
  // Send to someone this message
@@ -303,7 +303,7 @@ function startAdapter(options) {
303
303
  } else
304
304
  if (id.endsWith('communicate.responseSilent')) {
305
305
  if (typeof state.val === 'object') {
306
- adapter.log.error(`communicate.responseSilent only supports passing a message to send as string. You provided ${JSON.stringofy(state.val)}. Please use "communicate.responseSilentJson" instead with a stringified JSON object!`);
306
+ adapter.log.error(`communicate.responseSilent only supports passing a message to send as string. You provided ${JSON.stringify(state.val)}. Please use "communicate.responseSilentJson" instead with a stringified JSON object!`);
307
307
  return;
308
308
  }
309
309
  // Send to someone this message
@@ -383,6 +383,9 @@ function sendSystemMessage(text) {
383
383
  }
384
384
 
385
385
  function getStatus(id, state) {
386
+ if (!state) {
387
+ state = {val: 'State not set'};
388
+ }
386
389
  if (commands[id].type === 'boolean') {
387
390
  return `${commands[id].alias} => ${state.val ? commands[id].onStatus || _('ON-Status') : commands[id].offStatus || _('OFF-Status')}`;
388
391
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iobroker.telegram",
3
3
  "description": "The adapter allows to send and receive telegram messages from ioBroker and to be a broker.",
4
- "version": "1.12.2",
4
+ "version": "1.12.5",
5
5
  "author": "bluefox <dogafox@gmail.com>",
6
6
  "homepage": "https://github.com/iobroker-community-adapters/ioBroker.telegram",
7
7
  "repository": {