iobroker.gotify-ws 0.2.4 → 0.3.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/LICENSE +1 -1
- package/README.md +13 -68
- package/admin/i18n/de.json +28 -0
- package/admin/i18n/en.json +28 -0
- package/admin/i18n/{es/translations.json → es.json} +3 -1
- package/admin/i18n/{fr/translations.json → fr.json} +3 -1
- package/admin/i18n/{it/translations.json → it.json} +3 -1
- package/admin/i18n/{nl/translations.json → nl.json} +3 -1
- package/admin/i18n/{pl/translations.json → pl.json} +3 -1
- package/admin/i18n/{pt/translations.json → pt.json} +3 -1
- package/admin/i18n/{ru/translations.json → ru.json} +3 -1
- package/admin/i18n/{uk/translations.json → uk.json} +3 -1
- package/admin/i18n/{zh-cn/translations.json → zh-cn.json} +3 -1
- package/build/main.js +3 -3
- package/build/main.js.map +2 -2
- package/io-package.json +28 -28
- package/package.json +15 -15
- package/admin/i18n/de/translations.json +0 -26
- package/admin/i18n/en/translations.json +0 -27
- package/admin/words.js +0 -43
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -67,6 +67,17 @@ You can then configure a notification service of your choice for forwarding.
|
|
|
67
67
|
## Changelog
|
|
68
68
|
|
|
69
69
|
<!-- ### **WORK IN PROGRESS** -->
|
|
70
|
+
### 0.3.0 (2026-08-22)
|
|
71
|
+
* (copilot) Adapter requires node.js >= 22 now
|
|
72
|
+
* (simatec) dependencies updated
|
|
73
|
+
* (simatec) small Bugfixes
|
|
74
|
+
* (simatec) Translations added
|
|
75
|
+
* (simatec) Convert Translations
|
|
76
|
+
|
|
77
|
+
### 0.2.5 (2026-03-29)
|
|
78
|
+
* (simatec) Fix License
|
|
79
|
+
* (simatec) dependencies updated
|
|
80
|
+
|
|
70
81
|
### 0.2.4 (2025-11-23)
|
|
71
82
|
* (simatec) dependencies updated
|
|
72
83
|
* (simatec) Fix npm publish
|
|
@@ -77,79 +88,13 @@ You can then configure a notification service of your choice for forwarding.
|
|
|
77
88
|
### 0.2.2 (2025-07-20)
|
|
78
89
|
* (simatec) dependencies updated
|
|
79
90
|
|
|
80
|
-
|
|
81
|
-
* (simatec) dependencies updated
|
|
82
|
-
* (simatec) Ready for NodeJS 24.x
|
|
83
|
-
|
|
84
|
-
### 0.2.0 (2025-04-22)
|
|
85
|
-
* (simatec) Adapter rewritten in Typescript
|
|
86
|
-
|
|
87
|
-
### 0.1.13 (2025-04-16)
|
|
88
|
-
* (simatec) Dependencies updated
|
|
89
|
-
* (simatec) migrated to json5
|
|
90
|
-
|
|
91
|
-
### 0.1.12 (2025-02-22)
|
|
92
|
-
* (simatec) Dependencies updated
|
|
93
|
-
* (simatec) small fix
|
|
94
|
-
|
|
95
|
-
### 0.1.11 (2025-01-09)
|
|
96
|
-
* (simatec) eslint-config fix
|
|
97
|
-
* (simatec) Code fix
|
|
98
|
-
* (simatec) Dependencies updated
|
|
99
|
-
* (simatec) Update License
|
|
100
|
-
|
|
101
|
-
### 0.1.10 (2024-11-24)
|
|
102
|
-
* (simatec) Dependencies updated
|
|
103
|
-
* (simatec) Responsive Design fix
|
|
104
|
-
* (simatec) Issue Action added
|
|
105
|
-
* (simatec) eslint-config added
|
|
106
|
-
|
|
107
|
-
### 0.1.9 (2024-09-26)
|
|
108
|
-
* (simatec) Fix for admin 7.1.5
|
|
109
|
-
|
|
110
|
-
### 0.1.8 (2024-09-24)
|
|
111
|
-
* (simatec) Responsive Design fix
|
|
112
|
-
* (simatec) Cleaned code
|
|
113
|
-
|
|
114
|
-
### 0.1.7 (2024-09-16)
|
|
115
|
-
* (simatec) Dependencies updated
|
|
116
|
-
* (simatec) Responsive Design fix
|
|
117
|
-
|
|
118
|
-
### 0.1.6 (2024-09-10)
|
|
119
|
-
* (simatec) Fix Adapter Check
|
|
120
|
-
* (simatec) Dependencies updated
|
|
121
|
-
* (simatec) Responsive Design added
|
|
122
|
-
|
|
123
|
-
### 0.1.5 (2024-07-22)
|
|
124
|
-
* (simatec) small fix
|
|
125
|
-
|
|
126
|
-
### 0.1.4 (2024-07-19)
|
|
127
|
-
* (simatec) Dependencies updated
|
|
128
|
-
|
|
129
|
-
### 0.1.3 (2024-07-17)
|
|
130
|
-
* (simatec) Fix Test & Release
|
|
131
|
-
* (simatec) Fix Timeout
|
|
132
|
-
|
|
133
|
-
### 0.1.2 (2024-06-26)
|
|
134
|
-
* (simatec) Fix io-package
|
|
135
|
-
* (simatec) Notification-Manager added
|
|
136
|
-
|
|
137
|
-
### 0.1.1 (2024-06-19)
|
|
138
|
-
* (simatec) Fix Branch
|
|
139
|
-
|
|
140
|
-
### 0.1.0 (2024-06-19)
|
|
141
|
-
* (simatec) First Release
|
|
142
|
-
|
|
143
|
-
### 0.0.1 (2024-03-15)
|
|
144
|
-
* (simatec) initial release
|
|
145
|
-
|
|
146
|
-
---
|
|
91
|
+
[Older changelogs can be found there](CHANGELOG_OLD.md)
|
|
147
92
|
|
|
148
93
|
## License
|
|
149
94
|
|
|
150
95
|
MIT License
|
|
151
96
|
|
|
152
|
-
Copyright (c) 2024 -
|
|
97
|
+
Copyright (c) 2024 - 2026 simatec
|
|
153
98
|
|
|
154
99
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
155
100
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"All Receiver": "Alle Empfänger",
|
|
3
|
+
"Device ID": "Geräte ID",
|
|
4
|
+
"Discord Instance": "Discord-Instanz",
|
|
5
|
+
"Discord Target": "Discord-Ziel",
|
|
6
|
+
"E-Mail Instance": "E-Mail-Instanz",
|
|
7
|
+
"E-Mail Receiver": "E-Mail-Empfänger",
|
|
8
|
+
"E-Mail Sender": "E-Mail-Absender",
|
|
9
|
+
"Gotify IP or Domain": "Gotify IP oder Domain",
|
|
10
|
+
"Gotify Port": "Gotify-Port",
|
|
11
|
+
"Gotify Settings": "Gotify-Einstellungen",
|
|
12
|
+
"Gotify Token": "Gotify-Token",
|
|
13
|
+
"Gotify web socket for connection to various notification systems": "Gotify-Web-Socket zur Anbindung an verschiedene Benachrichtigungssysteme",
|
|
14
|
+
"If you like this project and would like to support its development, you are welcome to leave a donation.": "Wenn Ihnen dieses Projekt gefällt und Sie seine Entwicklung unterstützen möchten, können Sie gerne eine Spende hinterlassen.",
|
|
15
|
+
"Matrix Instance": "Matrix-Instanz",
|
|
16
|
+
"Notification Settings": "Benachrichtigungseinstellungen",
|
|
17
|
+
"Notification type": "Benachrichtigungstyp",
|
|
18
|
+
"Notification-Manager Instance": "Notification-Manager-Instanz",
|
|
19
|
+
"Pushover Instance": "Pushover-Instanz",
|
|
20
|
+
"Signal Instance": "Signal-Instanz",
|
|
21
|
+
"Silent Notice": "Stille Mitteilung",
|
|
22
|
+
"Telegram Instance": "Telegram-Instanz",
|
|
23
|
+
"Telegram User": "Telegram-Benutzer",
|
|
24
|
+
"Whatsapp Instance": "WhatsApp-Instanz",
|
|
25
|
+
"gotify-ws adapter settings": "Adaptereinstellungen für gotify-ws",
|
|
26
|
+
"none": "keine",
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"All Receiver": "All Receiver",
|
|
3
|
+
"Device ID": "Device ID",
|
|
4
|
+
"Discord Instance": "Discord Instance",
|
|
5
|
+
"Discord Target": "Discord Target",
|
|
6
|
+
"E-Mail Instance": "E-Mail Instance",
|
|
7
|
+
"E-Mail Receiver": "E-Mail Receiver",
|
|
8
|
+
"E-Mail Sender": "E-Mail Sender",
|
|
9
|
+
"Gotify IP or Domain": "Gotify IP or Domain",
|
|
10
|
+
"Gotify Port": "Gotify Port",
|
|
11
|
+
"Gotify Settings": "Gotify Settings",
|
|
12
|
+
"Gotify Token": "Gotify Token",
|
|
13
|
+
"Gotify web socket for connection to various notification systems": "Gotify web socket for connection to various notification systems",
|
|
14
|
+
"If you like this project and would like to support its development, you are welcome to leave a donation.": "If you like this project and would like to support its development, you are welcome to leave a donation.",
|
|
15
|
+
"Matrix Instance": "Matrix Instance",
|
|
16
|
+
"Notification Settings": "Notification Settings",
|
|
17
|
+
"Notification type": "Notification type",
|
|
18
|
+
"Notification-Manager Instance": "Notification-Manager Instance",
|
|
19
|
+
"Pushover Instance": "Pushover Instance",
|
|
20
|
+
"Signal Instance": "Signal Instance",
|
|
21
|
+
"Silent Notice": "Silent notice",
|
|
22
|
+
"Telegram Instance": "Telegram Instance",
|
|
23
|
+
"Telegram User": "Telegram User",
|
|
24
|
+
"Whatsapp Instance": "Whatsapp Instance",
|
|
25
|
+
"gotify-ws adapter settings": "Adapter settings for gotify-ws",
|
|
26
|
+
"none": "none",
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
28
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Todo el receptor",
|
|
2
3
|
"Device ID": "ID del dispositivo",
|
|
3
4
|
"Discord Instance": "Instancia de discordia",
|
|
4
5
|
"Discord Target": "Objetivo de discordia",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Instancia de matriz",
|
|
15
16
|
"Notification Settings": "Configuración de las notificaciones",
|
|
16
17
|
"Notification type": "Tipo de notificación",
|
|
18
|
+
"Notification-Manager Instance": "Instancia de administrador de notificaciones",
|
|
17
19
|
"Pushover Instance": "Instancia fácil de convencer",
|
|
18
20
|
"Signal Instance": "Instancia de señal",
|
|
19
21
|
"Silent Notice": "Aviso silencioso",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Instancia de WhatsApp",
|
|
23
25
|
"gotify-ws adapter settings": "Configuración del adaptador para gotify-ws",
|
|
24
26
|
"none": "ninguno",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Tous les récepteurs",
|
|
2
3
|
"Device ID": "Reference de l'appareil",
|
|
3
4
|
"Discord Instance": "Instance de discorde",
|
|
4
5
|
"Discord Target": "Cible de discorde",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Instance matricielle",
|
|
15
16
|
"Notification Settings": "Paramètres de notification",
|
|
16
17
|
"Notification type": "Type de notification",
|
|
18
|
+
"Notification-Manager Instance": "Instance du gestionnaire de notifications",
|
|
17
19
|
"Pushover Instance": "Instance de transfert",
|
|
18
20
|
"Signal Instance": "Instance de signal",
|
|
19
21
|
"Silent Notice": "Avis silencieux",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Instance WhatsApp",
|
|
23
25
|
"gotify-ws adapter settings": "Paramètres de l'adaptateur pour gotify-ws",
|
|
24
26
|
"none": "aucun",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Tutti i ricevitori",
|
|
2
3
|
"Device ID": "ID del dispositivo",
|
|
3
4
|
"Discord Instance": "Istanza della discordia",
|
|
4
5
|
"Discord Target": "Obiettivo della discordia",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Istanza della matrice",
|
|
15
16
|
"Notification Settings": "Impostazioni di notifica",
|
|
16
17
|
"Notification type": "Tipo di notifica",
|
|
18
|
+
"Notification-Manager Instance": "Istanza del gestore delle notifiche",
|
|
17
19
|
"Pushover Instance": "Istanza push-over",
|
|
18
20
|
"Signal Instance": "Istanza del segnale",
|
|
19
21
|
"Silent Notice": "Avviso silenzioso",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Istanza di Whatsapp",
|
|
23
25
|
"gotify-ws adapter settings": "Impostazioni dell'adattatore per gotify-ws",
|
|
24
26
|
"none": "nessuno",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Alle ontvanger",
|
|
2
3
|
"Device ID": "Apparaat ID",
|
|
3
4
|
"Discord Instance": "Discord-instantie",
|
|
4
5
|
"Discord Target": "Onenigheid Doel",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Matrix-instantie",
|
|
15
16
|
"Notification Settings": "Notificatie instellingen",
|
|
16
17
|
"Notification type": "Melding type",
|
|
18
|
+
"Notification-Manager Instance": "Notification-Manager-instantie",
|
|
17
19
|
"Pushover Instance": "Pushover-instantie",
|
|
18
20
|
"Signal Instance": "Signaalinstantie",
|
|
19
21
|
"Silent Notice": "Stille mededeling",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Whatsapp-instantie",
|
|
23
25
|
"gotify-ws adapter settings": "Adapterinstellingen voor gotify-ws",
|
|
24
26
|
"none": "geen",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Cały odbiornik",
|
|
2
3
|
"Device ID": "Identyfikator urzadzenia",
|
|
3
4
|
"Discord Instance": "Instancja Discorda",
|
|
4
5
|
"Discord Target": "Cel niezgody",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Instancja matrycy",
|
|
15
16
|
"Notification Settings": "Ustawienia powiadomień",
|
|
16
17
|
"Notification type": "Typ powiadomienia",
|
|
18
|
+
"Notification-Manager Instance": "Instancja menedżera powiadomień",
|
|
17
19
|
"Pushover Instance": "Instancja Pushover",
|
|
18
20
|
"Signal Instance": "Instancja sygnału",
|
|
19
21
|
"Silent Notice": "Ciche powiadomienie",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Instancja Whatsapp",
|
|
23
25
|
"gotify-ws adapter settings": "Ustawienia adaptera dla gotify-ws",
|
|
24
26
|
"none": "nic",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Todos os receptores",
|
|
2
3
|
"Device ID": "ID de dispositivo",
|
|
3
4
|
"Discord Instance": "Instância de discórdia",
|
|
4
5
|
"Discord Target": "Alvo de discórdia",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Instância de matriz",
|
|
15
16
|
"Notification Settings": "Configurações de notificação",
|
|
16
17
|
"Notification type": "Tipo de notificação",
|
|
18
|
+
"Notification-Manager Instance": "Instância do Gerenciador de Notificação",
|
|
17
19
|
"Pushover Instance": "Instância pushover",
|
|
18
20
|
"Signal Instance": "Instância de Sinal",
|
|
19
21
|
"Silent Notice": "Aviso silencioso",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Instância do Whatsapp",
|
|
23
25
|
"gotify-ws adapter settings": "Configurações do adaptador para gotify-ws",
|
|
24
26
|
"none": "nenhum",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Все приемник",
|
|
2
3
|
"Device ID": "Идентификатор устройства",
|
|
3
4
|
"Discord Instance": "Экземпляр Дискорда",
|
|
4
5
|
"Discord Target": "Цель разногласий",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Экземпляр матрицы",
|
|
15
16
|
"Notification Settings": "Настройки уведомлений",
|
|
16
17
|
"Notification type": "Тип уведомления",
|
|
18
|
+
"Notification-Manager Instance": "Экземпляр диспетчера уведомлений",
|
|
17
19
|
"Pushover Instance": "Пушоверный экземпляр",
|
|
18
20
|
"Signal Instance": "Экземпляр сигнала",
|
|
19
21
|
"Silent Notice": "Тихое уведомление",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Экземпляр WhatsApp",
|
|
23
25
|
"gotify-ws adapter settings": "Настройки адаптера для gotify-ws",
|
|
24
26
|
"none": "никто",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "хххх@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "Весь приймач",
|
|
2
3
|
"Device ID": "ID пристрою",
|
|
3
4
|
"Discord Instance": "Екземпляр Discord",
|
|
4
5
|
"Discord Target": "Discord Target",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "Екземпляр матриці",
|
|
15
16
|
"Notification Settings": "Налаштування сповіщень",
|
|
16
17
|
"Notification type": "Тип сповіщення",
|
|
18
|
+
"Notification-Manager Instance": "Примірник Notification-Manager",
|
|
17
19
|
"Pushover Instance": "Примірник Pushover",
|
|
18
20
|
"Signal Instance": "Примірник сигналу",
|
|
19
21
|
"Silent Notice": "Мовчазне повідомлення",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Екземпляр WhatsApp",
|
|
23
25
|
"gotify-ws adapter settings": "Налаштування адаптера для gotify-ws",
|
|
24
26
|
"none": "немає",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"All Receiver": "所有接收器",
|
|
2
3
|
"Device ID": "设备ID",
|
|
3
4
|
"Discord Instance": "不和谐实例",
|
|
4
5
|
"Discord Target": "不和谐目标",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"Matrix Instance": "矩阵实例",
|
|
15
16
|
"Notification Settings": "通知设置",
|
|
16
17
|
"Notification type": "通知类型",
|
|
18
|
+
"Notification-Manager Instance": "通知管理器实例",
|
|
17
19
|
"Pushover Instance": "推倒实例",
|
|
18
20
|
"Signal Instance": "信号实例",
|
|
19
21
|
"Silent Notice": "无声通知",
|
|
@@ -22,5 +24,5 @@
|
|
|
22
24
|
"Whatsapp Instance": "Whatsapp 实例",
|
|
23
25
|
"gotify-ws adapter settings": "Gotify-ws 的适配器设置",
|
|
24
26
|
"none": "没有任何",
|
|
25
|
-
"
|
|
27
|
+
"xxxx@xxxx.com": "xxxx@xxxx.com"
|
|
26
28
|
}
|
package/build/main.js
CHANGED
|
@@ -171,7 +171,7 @@ class GotifyWs extends utils.Adapter {
|
|
|
171
171
|
});
|
|
172
172
|
this.ws.on("error", async (err) => {
|
|
173
173
|
await this.setState("info.connection", false, true);
|
|
174
|
-
this.log.error(`WebSocket error: ${err}`);
|
|
174
|
+
this.log.error(`WebSocket error: ${err.message}`);
|
|
175
175
|
});
|
|
176
176
|
} else {
|
|
177
177
|
this.log.error("WebSocket error: Please check your Configuration");
|
|
@@ -356,11 +356,11 @@ class GotifyWs extends utils.Adapter {
|
|
|
356
356
|
async _(word, systemLang) {
|
|
357
357
|
return new Promise((resolve) => {
|
|
358
358
|
void (async () => {
|
|
359
|
-
const translations = await Promise.resolve().then(() => __toESM(require(`../admin/i18n/${systemLang ? systemLang : "en"}
|
|
359
|
+
const translations = await Promise.resolve().then(() => __toESM(require(`../admin/i18n/${systemLang ? systemLang : "en"}.json`)));
|
|
360
360
|
if (translations[word]) {
|
|
361
361
|
resolve(translations[word]);
|
|
362
362
|
} else {
|
|
363
|
-
this.log.debug(`Please translate in
|
|
363
|
+
this.log.debug(`Please translate in ${systemLang ? systemLang : "en"}.json: ${word}`);
|
|
364
364
|
resolve(word);
|
|
365
365
|
}
|
|
366
366
|
})();
|
package/build/main.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["'use strict';\n\nimport WebSocket from 'ws';\nimport * as utils from '@iobroker/adapter-core';\n\nclass GotifyWs extends utils.Adapter {\n private systemLang: string = 'de';\n private ws!: WebSocket;\n private timer: ioBroker.Timeout | undefined = undefined;\n private stopNow: boolean = false;\n\n public constructor(options: Partial<utils.AdapterOptions> = {}) {\n super({\n ...options,\n name: 'gotify-ws',\n });\n this.on('ready', this.onReady.bind(this));\n this.on('unload', this.onUnload.bind(this));\n }\n\n private async onReady(): Promise<void> {\n const sysLang = await this.getForeignObjectAsync('system.config');\n\n if (sysLang && sysLang.common && sysLang.common.language) {\n this.systemLang = sysLang.common.language;\n }\n\n await this.setState('info.connection', false, true);\n this.connectWebSocket();\n }\n\n private async onUnload(callback: () => void): Promise<void> {\n await this.setState('info.connection', false, true);\n\n try {\n if (this.ws) {\n this.stopNow = true;\n this.ws.close();\n this.ws.terminate();\n this.clearTimeout(this.timer);\n this.timer = null;\n }\n callback();\n } catch (e) {\n callback();\n }\n }\n\n private async onMessage(obj: ioBroker.Message | null): Promise<void> {\n switch (obj?.command) {\n case 'sendToInstance':\n if (obj && obj.command === 'sendToInstance' && obj.message && obj.message.type) {\n const resultInstances = [];\n\n const instances = await this.getObjectViewAsync('system', 'instance', {\n startkey: `system.adapter.${obj.message.type}.`,\n\n endkey: `system.adapter.${obj.message.type}.\\u9999`,\n }).catch(err => this.log.error(err));\n\n if (instances && instances.rows && instances.rows.length != 0) {\n instances.rows.forEach(row => {\n resultInstances.push({\n label: row.id.replace('system.adapter.', ''),\n value: row.id.replace('system.adapter.', ''),\n });\n });\n } else {\n resultInstances.push({\n label: this._('none', this.systemLang),\n value: 'none',\n });\n }\n this.log.debug(`sendToInstance - ${JSON.stringify(obj)}`);\n this.sendTo(obj.from, obj.command, resultInstances, obj.callback);\n }\n break;\n\n case 'sendToTelegramUser': {\n let useUsername = false;\n\n if (obj && obj.command === 'sendToTelegramUser' && obj.message && obj.message.instance) {\n const inst = obj.message.instance ? obj.message.instance : this.config.telegramInstance;\n const userList = (await this.getForeignStateAsync(`${inst}.communicate.users`)) as ioBroker.State;\n const configTelegram = await this.getForeignObjectAsync(`system.adapter.${inst}`);\n\n if (configTelegram && configTelegram.native) {\n const native = configTelegram.native;\n useUsername = native.useUsername;\n }\n\n const resultUser = [{ label: this._('All Receiver', this.systemLang), value: 'allTelegramUsers' }];\n\n if (userList && userList?.val) {\n const users = JSON.parse(userList?.val as string);\n\n for (const i in users) {\n resultUser.push({\n label: useUsername === true ? users[i].userName : users[i].firstName,\n value: useUsername === true ? users[i].userName : users[i].firstName,\n });\n }\n\n try {\n this.sendTo(obj.from, obj.command, resultUser, obj.callback);\n } catch (err) {\n this.log.error(`Cannot parse stored user IDs from Telegram: ${err}`);\n }\n }\n }\n break;\n }\n case 'sendToDiscordTarget':\n if (obj && obj.command === 'sendToDiscordTarget' && obj.message && obj.message.instance) {\n const resultTarget = [{ label: this._('none', this.systemLang), value: 'none' }];\n\n const targetList = await this.sendToAsync(obj.message.instance, 'getNotificationTargets', {});\n\n if (Array.isArray(targetList)) {\n for (const i in targetList) {\n resultTarget.push({\n label: targetList[i].value,\n value: targetList[i].value,\n });\n }\n }\n\n try {\n this.sendTo(obj.from, obj.command, resultTarget, obj.callback);\n } catch (err) {\n this.log.error(`Cannot parse stored user IDs from Discord: ${err}`);\n }\n } else if (obj && obj.command === 'sendToDiscordTarget') {\n const resultTarget = [{ label: this._('none', this.systemLang), value: 'none' }];\n\n try {\n this.sendTo(obj.from, obj.command, resultTarget, obj.callback);\n } catch (err) {\n this.log.error(`Cannot parse stored user IDs from Discord: ${err}`);\n }\n }\n break;\n }\n }\n\n private connectWebSocket(): void {\n if (this.config.ip && this.config.port) {\n const uri = `ws://${this.config.ip}:${this.config.port}/stream`;\n\n this.ws = new WebSocket(uri, {\n headers: {\n 'X-Gotify-Key': this.config.token,\n },\n });\n\n this.ws.on('open', async () => {\n await this.setState('info.connection', true, true);\n this.log.info('WebSocket connected');\n });\n\n this.ws.on('message', async data => {\n if (typeof data !== 'string' && !Buffer.isBuffer(data)) {\n this.log.warn('Unexpected WebSocket message format');\n return;\n }\n\n const message = typeof data === 'string' ? data : data.toString('utf-8');\n const line = JSON.parse(message);\n await this.pushMessage(line);\n });\n\n this.ws.on('close', async () => {\n await this.setState('info.connection', false, true);\n this.log.info('WebSocket closed');\n if (this.stopNow === false) {\n this.timer = this.setTimeout(this.connectWebSocket, 5000);\n }\n });\n\n this.ws.on('error', async err => {\n await this.setState('info.connection', false, true);\n\n this.log.error(`WebSocket error: ${err}`);\n });\n } else {\n this.log.error('WebSocket error: Please check your Configuration');\n }\n }\n\n private async pushMessage(line: ioBroker.GotifyMessage): Promise<void> {\n if (this.config.notificationType) {\n switch (this.config.notificationType) {\n case 'telegram':\n if (\n this.config.telegramUser &&\n this.config.telegramUser === 'allTelegramUsers' &&\n this.config.telegramInstance\n ) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.telegramInstance, 'send', {\n parse_mode: 'HTML',\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Telegram message: ${err}`);\n }\n } else if (\n this.config.telegramUser &&\n this.config.telegramUser != 'allTelegramUsers' &&\n this.config.telegramInstance\n ) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.telegramInstance, 'send', {\n user: this.config.telegramUser,\n parse_mode: 'HTML',\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Telegram message: ${err}`);\n }\n }\n break;\n case 'email':\n if (this.config.emailInstance && this.config.emailReceiver && this.config.emailSender) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title = line.title != '' ? line.title.replace(/[`]/g, '') : 'Gotifi WS Message';\n\n try {\n await this.sendToAsync(this.config.emailInstance, 'send', {\n text: formatMessage,\n to: this.config.emailReceiver,\n subject: title,\n from: this.config.emailSender,\n });\n } catch (err) {\n this.log.warn(`Error sending E-Mail message: ${err}`);\n }\n }\n break;\n case 'pushover':\n if (\n this.config.pushoverSilentNotice === true &&\n this.config.pushoverInstance &&\n this.config.pushoverDeviceID\n ) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.pushoverInstance, 'send', {\n message: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n sound: '',\n priority: -1,\n title: title,\n device: this.config.pushoverDeviceID,\n html: 1,\n });\n } catch (err) {\n this.log.warn(`Error sending Pushover message: ${err}`);\n }\n } else if (this.config.pushoverInstance && this.config.pushoverDeviceID) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.pushoverInstance, 'send', {\n message: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n sound: '',\n title: title,\n device: this.config.pushoverDeviceID,\n html: 1,\n });\n } catch (err) {\n this.log.warn(`Error sending Pushover message: ${err}`);\n }\n }\n break;\n case 'whatsapp-cmb':\n if (this.config.whatsappInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title = line.title != '' ? `*${line.title.replace(/[`]/g, '')}*` : '*Gotifi WS Message*';\n\n try {\n await this.sendToAsync(this.config.whatsappInstance, 'send', {\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending WhatsApp message: ${err}`);\n }\n }\n break;\n case 'notification-manager':\n if (this.config.notificationManagerInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(\n this.config.notificationManagerInstance,\n 'registerUserNotification',\n {\n category: 'notify',\n message: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n },\n );\n } catch (err) {\n this.log.warn(`Error sending Notification-Manager message: ${err}`);\n }\n }\n break;\n case 'signal-cmb':\n if (this.config.signalInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title = line.title != '' ? line.title.replace(/[`]/g, '') : 'Gotifi WS Message';\n\n try {\n await this.sendToAsync(this.config.signalInstance, 'send', {\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Signal message: ${err}`);\n }\n }\n break;\n case 'matrix-org':\n if (this.config.matrixInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.matrixInstance, {\n html: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Matrix message: ${err}`);\n }\n }\n break;\n case 'discord':\n if (this.config.discordInstance && this.config.discordTarget) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : 'Gotifi WS Message';\n\n if (this.config.discordTarget.match(/^\\d+$/)) {\n // send to a single user\n try {\n await this.sendToAsync(this.config.discordInstance, 'sendMessage', {\n userId: this.config.discordTarget,\n content: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Discord message: ${err}`);\n }\n } else if (this.config.discordTarget.match(/^\\d+\\/\\d+$/)) {\n // send to a server channel\n const [serverId, channelId] = this.config.discordTarget.split('/');\n try {\n await this.sendToAsync(this.config.discordInstance, 'sendMessage', {\n serverId,\n channelId,\n content: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Discord message: ${err}`);\n }\n }\n }\n break;\n }\n } else {\n this.log.error('Push-Message error: Please check your Configuration');\n }\n }\n\n private async _(word: string, systemLang: string): Promise<string> {\n return new Promise(resolve => {\n void (async () => {\n const translations = await import(`../admin/i18n/${systemLang ? systemLang : 'en'}/translations.json`);\n if (translations[word]) {\n resolve(translations[word]);\n } else {\n this.log.debug(`Please translate in translations.json: ${word}`);\n resolve(word);\n }\n })();\n });\n }\n}\n\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial<utils.AdapterOptions> | undefined) => new GotifyWs(options);\n} else {\n // otherwise start the instance directly\n (() => new GotifyWs())();\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAEA,gBAAsB;AACtB,YAAuB;AAEvB,MAAM,iBAAiB,MAAM,QAAQ;AAAA,EACzB,aAAqB;AAAA,EACrB;AAAA,EACA,QAAsC;AAAA,EACtC,UAAmB;AAAA,EAEpB,YAAY,UAAyC,CAAC,GAAG;AAC5D,UAAM;AAAA,MACF,GAAG;AAAA,MACH,MAAM;AAAA,IACV,CAAC;AACD,SAAK,GAAG,SAAS,KAAK,QAAQ,KAAK,IAAI,CAAC;AACxC,SAAK,GAAG,UAAU,KAAK,SAAS,KAAK,IAAI,CAAC;AAAA,EAC9C;AAAA,EAEA,MAAc,UAAyB;AACnC,UAAM,UAAU,MAAM,KAAK,sBAAsB,eAAe;AAEhE,QAAI,WAAW,QAAQ,UAAU,QAAQ,OAAO,UAAU;AACtD,WAAK,aAAa,QAAQ,OAAO;AAAA,I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AAO,SAAS,YAAY,CAAC,OAAO,SAAS,IAAI,GAAG;AACpD,eAAK,IAAI,KAAK,qCAAqC;AACnD;AAAA,QACJ;AAEA,cAAM,UAAU,OAAO,SAAS,WAAW,OAAO,KAAK,SAAS,OAAO;AACvE,cAAM,OAAO,KAAK,MAAM,OAAO;AAC/B,cAAM,KAAK,YAAY,IAAI;AAAA,MAC/B,CAAC;AAED,WAAK,GAAG,GAAG,SAAS,YAAY;AAC5B,cAAM,KAAK,SAAS,mBAAmB,OAAO,IAAI;AAClD,aAAK,IAAI,KAAK,kBAAkB;AAChC,YAAI,KAAK,YAAY,OAAO;AACxB,eAAK,QAAQ,KAAK,WAAW,KAAK,kBAAkB,GAAI;AAAA,QAC5D;AAAA,MACJ,CAAC;AAED,WAAK,GAAG,GAAG,SAAS,OAAM,QAAO;AAC7B,cAAM,KAAK,SAAS,mBAAmB,OAAO,IAAI;AAElD,aAAK,IAAI,MAAM,oBAAoB,
|
|
4
|
+
"sourcesContent": ["'use strict';\n\nimport WebSocket from 'ws';\nimport * as utils from '@iobroker/adapter-core';\n\nclass GotifyWs extends utils.Adapter {\n private systemLang: string = 'de';\n private ws!: WebSocket;\n private timer: ioBroker.Timeout | undefined = undefined;\n private stopNow: boolean = false;\n\n public constructor(options: Partial<utils.AdapterOptions> = {}) {\n super({\n ...options,\n name: 'gotify-ws',\n });\n this.on('ready', this.onReady.bind(this));\n this.on('unload', this.onUnload.bind(this));\n }\n\n private async onReady(): Promise<void> {\n const sysLang = await this.getForeignObjectAsync('system.config');\n\n if (sysLang && sysLang.common && sysLang.common.language) {\n this.systemLang = sysLang.common.language;\n }\n\n await this.setState('info.connection', false, true);\n this.connectWebSocket();\n }\n\n private async onUnload(callback: () => void): Promise<void> {\n await this.setState('info.connection', false, true);\n\n try {\n if (this.ws) {\n this.stopNow = true;\n this.ws.close();\n this.ws.terminate();\n this.clearTimeout(this.timer);\n this.timer = null;\n }\n callback();\n } catch (e) {\n callback();\n }\n }\n\n private async onMessage(obj: ioBroker.Message | null): Promise<void> {\n switch (obj?.command) {\n case 'sendToInstance':\n if (obj && obj.command === 'sendToInstance' && obj.message && obj.message.type) {\n const resultInstances = [];\n\n const instances = await this.getObjectViewAsync('system', 'instance', {\n startkey: `system.adapter.${obj.message.type}.`,\n\n endkey: `system.adapter.${obj.message.type}.\\u9999`,\n }).catch(err => this.log.error(err));\n\n if (instances && instances.rows && instances.rows.length != 0) {\n instances.rows.forEach(row => {\n resultInstances.push({\n label: row.id.replace('system.adapter.', ''),\n value: row.id.replace('system.adapter.', ''),\n });\n });\n } else {\n resultInstances.push({\n label: this._('none', this.systemLang),\n value: 'none',\n });\n }\n this.log.debug(`sendToInstance - ${JSON.stringify(obj)}`);\n this.sendTo(obj.from, obj.command, resultInstances, obj.callback);\n }\n break;\n\n case 'sendToTelegramUser': {\n let useUsername = false;\n\n if (obj && obj.command === 'sendToTelegramUser' && obj.message && obj.message.instance) {\n const inst = obj.message.instance ? obj.message.instance : this.config.telegramInstance;\n const userList = (await this.getForeignStateAsync(`${inst}.communicate.users`)) as ioBroker.State;\n const configTelegram = await this.getForeignObjectAsync(`system.adapter.${inst}`);\n\n if (configTelegram && configTelegram.native) {\n const native = configTelegram.native;\n useUsername = native.useUsername;\n }\n\n const resultUser = [{ label: this._('All Receiver', this.systemLang), value: 'allTelegramUsers' }];\n\n if (userList && userList?.val) {\n const users = JSON.parse(userList?.val as string);\n\n for (const i in users) {\n resultUser.push({\n label: useUsername === true ? users[i].userName : users[i].firstName,\n value: useUsername === true ? users[i].userName : users[i].firstName,\n });\n }\n\n try {\n this.sendTo(obj.from, obj.command, resultUser, obj.callback);\n } catch (err) {\n this.log.error(`Cannot parse stored user IDs from Telegram: ${err}`);\n }\n }\n }\n break;\n }\n case 'sendToDiscordTarget':\n if (obj && obj.command === 'sendToDiscordTarget' && obj.message && obj.message.instance) {\n const resultTarget = [{ label: this._('none', this.systemLang), value: 'none' }];\n\n const targetList = await this.sendToAsync(obj.message.instance, 'getNotificationTargets', {});\n\n if (Array.isArray(targetList)) {\n for (const i in targetList) {\n resultTarget.push({\n label: targetList[i].value,\n value: targetList[i].value,\n });\n }\n }\n\n try {\n this.sendTo(obj.from, obj.command, resultTarget, obj.callback);\n } catch (err) {\n this.log.error(`Cannot parse stored user IDs from Discord: ${err}`);\n }\n } else if (obj && obj.command === 'sendToDiscordTarget') {\n const resultTarget = [{ label: this._('none', this.systemLang), value: 'none' }];\n\n try {\n this.sendTo(obj.from, obj.command, resultTarget, obj.callback);\n } catch (err) {\n this.log.error(`Cannot parse stored user IDs from Discord: ${err}`);\n }\n }\n break;\n }\n }\n\n private connectWebSocket(): void {\n if (this.config.ip && this.config.port) {\n const uri = `ws://${this.config.ip}:${this.config.port}/stream`;\n\n this.ws = new WebSocket(uri, {\n headers: {\n 'X-Gotify-Key': this.config.token,\n },\n });\n\n this.ws.on('open', async () => {\n await this.setState('info.connection', true, true);\n this.log.info('WebSocket connected');\n });\n\n this.ws.on('message', async data => {\n if (typeof data !== 'string' && !Buffer.isBuffer(data)) {\n this.log.warn('Unexpected WebSocket message format');\n return;\n }\n\n const message = typeof data === 'string' ? data : data.toString('utf-8');\n const line = JSON.parse(message);\n await this.pushMessage(line);\n });\n\n this.ws.on('close', async () => {\n await this.setState('info.connection', false, true);\n this.log.info('WebSocket closed');\n if (this.stopNow === false) {\n this.timer = this.setTimeout(this.connectWebSocket, 5000);\n }\n });\n\n this.ws.on('error', async err => {\n await this.setState('info.connection', false, true);\n\n this.log.error(`WebSocket error: ${err.message}`);\n });\n } else {\n this.log.error('WebSocket error: Please check your Configuration');\n }\n }\n\n private async pushMessage(line: ioBroker.GotifyMessage): Promise<void> {\n if (this.config.notificationType) {\n switch (this.config.notificationType) {\n case 'telegram':\n if (\n this.config.telegramUser &&\n this.config.telegramUser === 'allTelegramUsers' &&\n this.config.telegramInstance\n ) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.telegramInstance, 'send', {\n parse_mode: 'HTML',\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Telegram message: ${err}`);\n }\n } else if (\n this.config.telegramUser &&\n this.config.telegramUser != 'allTelegramUsers' &&\n this.config.telegramInstance\n ) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.telegramInstance, 'send', {\n user: this.config.telegramUser,\n parse_mode: 'HTML',\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Telegram message: ${err}`);\n }\n }\n break;\n case 'email':\n if (this.config.emailInstance && this.config.emailReceiver && this.config.emailSender) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title = line.title != '' ? line.title.replace(/[`]/g, '') : 'Gotifi WS Message';\n\n try {\n await this.sendToAsync(this.config.emailInstance, 'send', {\n text: formatMessage,\n to: this.config.emailReceiver,\n subject: title,\n from: this.config.emailSender,\n });\n } catch (err) {\n this.log.warn(`Error sending E-Mail message: ${err}`);\n }\n }\n break;\n case 'pushover':\n if (\n this.config.pushoverSilentNotice === true &&\n this.config.pushoverInstance &&\n this.config.pushoverDeviceID\n ) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.pushoverInstance, 'send', {\n message: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n sound: '',\n priority: -1,\n title: title,\n device: this.config.pushoverDeviceID,\n html: 1,\n });\n } catch (err) {\n this.log.warn(`Error sending Pushover message: ${err}`);\n }\n } else if (this.config.pushoverInstance && this.config.pushoverDeviceID) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.pushoverInstance, 'send', {\n message: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n sound: '',\n title: title,\n device: this.config.pushoverDeviceID,\n html: 1,\n });\n } catch (err) {\n this.log.warn(`Error sending Pushover message: ${err}`);\n }\n }\n break;\n case 'whatsapp-cmb':\n if (this.config.whatsappInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title = line.title != '' ? `*${line.title.replace(/[`]/g, '')}*` : '*Gotifi WS Message*';\n\n try {\n await this.sendToAsync(this.config.whatsappInstance, 'send', {\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending WhatsApp message: ${err}`);\n }\n }\n break;\n case 'notification-manager':\n if (this.config.notificationManagerInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(\n this.config.notificationManagerInstance,\n 'registerUserNotification',\n {\n category: 'notify',\n message: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n },\n );\n } catch (err) {\n this.log.warn(`Error sending Notification-Manager message: ${err}`);\n }\n }\n break;\n case 'signal-cmb':\n if (this.config.signalInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title = line.title != '' ? line.title.replace(/[`]/g, '') : 'Gotifi WS Message';\n\n try {\n await this.sendToAsync(this.config.signalInstance, 'send', {\n text: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Signal message: ${err}`);\n }\n }\n break;\n case 'matrix-org':\n if (this.config.matrixInstance) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : '<b>Gotifi WS Message</b>';\n\n try {\n await this.sendToAsync(this.config.matrixInstance, {\n html: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Matrix message: ${err}`);\n }\n }\n break;\n case 'discord':\n if (this.config.discordInstance && this.config.discordTarget) {\n const formatMessage = line.message.replace(/[`]/g, '').replace(/[']/g, '\"');\n\n const title =\n line.title != '' ? `<b>${line.title.replace(/[`]/g, '')}</b>` : 'Gotifi WS Message';\n\n if (this.config.discordTarget.match(/^\\d+$/)) {\n // send to a single user\n try {\n await this.sendToAsync(this.config.discordInstance, 'sendMessage', {\n userId: this.config.discordTarget,\n content: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Discord message: ${err}`);\n }\n } else if (this.config.discordTarget.match(/^\\d+\\/\\d+$/)) {\n // send to a server channel\n const [serverId, channelId] = this.config.discordTarget.split('/');\n try {\n await this.sendToAsync(this.config.discordInstance, 'sendMessage', {\n serverId,\n channelId,\n content: `${title != '' ? `${title}\\n` : ''}${formatMessage}`,\n });\n } catch (err) {\n this.log.warn(`Error sending Discord message: ${err}`);\n }\n }\n }\n break;\n }\n } else {\n this.log.error('Push-Message error: Please check your Configuration');\n }\n }\n\n private async _(word: string, systemLang: string): Promise<string> {\n return new Promise(resolve => {\n void (async () => {\n const translations = await import(`../admin/i18n/${systemLang ? systemLang : 'en'}.json`);\n if (translations[word]) {\n resolve(translations[word]);\n } else {\n this.log.debug(`Please translate in ${systemLang ? systemLang : 'en'}.json: ${word}`);\n resolve(word);\n }\n })();\n });\n }\n}\n\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial<utils.AdapterOptions> | undefined) => new GotifyWs(options);\n} else {\n // otherwise start the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AG;AACpB,kBAAQ,aAAa,IAAI,CAAC;AAAA,QAC9B,OAAO;AACH,eAAK,IAAI,MAAM,uBAAuB,aAAa,aAAa,IAAI,UAAU,IAAI,EAAE;AACpF,kBAAQ,IAAI;AAAA,QAChB;AAAA,MACJ,GAAG;AAAA,IACP,CAAC;AAAA,EACL;AACJ;AAEA,IAAI,QAAQ,SAAS,QAAQ;AAEzB,SAAO,UAAU,CAAC,YAAuD,IAAI,SAAS,OAAO;AACjG,OAAO;AAEH,GAAC,MAAM,IAAI,SAAS,GAAG;AAC3B;",
|
|
6
6
|
"names": ["WebSocket"]
|
|
7
7
|
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "gotify-ws",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.3.0": {
|
|
7
|
+
"en": "Adapter requires node.js >= 22 now\ndependencies updated\nsmall Bugfixes\nTranslations added\nConvert Translations",
|
|
8
|
+
"de": "Der Adapter benötigt jetzt Node.js >= 22.\nAbhängigkeiten aktualisiert\nkleinere Fehlerbehebungen\nÜbersetzungen hinzugefügt\nÜbersetzungen konvertieren",
|
|
9
|
+
"ru": "Для работы адаптера требуется Node.js версии >= 22.\nЗависимости обновлены\nнебольшие исправления ошибок\nДобавлены переводы\nПреобразовать переводы",
|
|
10
|
+
"pt": "O adaptador agora requer Node.js >= 22.\ndependências atualizadas\nPequenas correções de bugs\nTraduções adicionadas\nConverter traduções",
|
|
11
|
+
"nl": "De adapter vereist nu Node.js versie 22 of hoger.\nafhankelijkheden bijgewerkt\nkleine bugfixes\nVertalingen toegevoegd\nVertalingen converteren",
|
|
12
|
+
"fr": "L'adaptateur nécessite désormais Node.js >= 22.\ndépendances mises à jour\nCorrections de bugs mineurs\nTraductions ajoutées\nConvertir les traductions",
|
|
13
|
+
"it": "L'adattatore ora richiede Node.js >= 22\ndipendenze aggiornate\nPiccole correzioni di bug\nTraduzioni aggiunte\nConvertire le traduzioni",
|
|
14
|
+
"es": "El adaptador ahora requiere node.js >= 22.\ndependencias actualizadas\nPequeñas correcciones de errores\nTraducciones añadidas\nConvertir traducciones",
|
|
15
|
+
"pl": "Adapter wymaga teraz node.js >= 22\nzależności zaktualizowane\ndrobne poprawki błędów\nDodano tłumaczenia\nKonwertuj tłumaczenia",
|
|
16
|
+
"uk": "Адаптер тепер вимагає node.js >= 22\nзалежності оновлено\nневеликі виправлення помилок\nДодано переклади\nКонвертувати переклади",
|
|
17
|
+
"zh-cn": "适配器现在需要 node.js 版本 >= 22。\n依赖项已更新\n修复了一些小错误\n新增翻译\n转换翻译"
|
|
18
|
+
},
|
|
19
|
+
"0.2.5": {
|
|
20
|
+
"en": "Fix License\ndependencies updated",
|
|
21
|
+
"de": "Lizenzierung aktivieren\naktualisierte abhängigkeiten",
|
|
22
|
+
"ru": "Лицензия Fix\nобновленные зависимости",
|
|
23
|
+
"pt": "Licença de correção\ndependências atualizadas",
|
|
24
|
+
"nl": "Fix Licentie\nafhankelijkheden bijgewerkt",
|
|
25
|
+
"fr": "Correction de la licence\ndépendances mises à jour",
|
|
26
|
+
"it": "Fissare la licenza\ndipendenze aggiornate",
|
|
27
|
+
"es": "Fijar licencia\ndependencias actualizadas",
|
|
28
|
+
"pl": "Napraw licencję\nzaktualizowane zależności",
|
|
29
|
+
"uk": "Документація\nоновлені залежності",
|
|
30
|
+
"zh-cn": "修补许可证\n更新依赖关系"
|
|
31
|
+
},
|
|
6
32
|
"0.2.4": {
|
|
7
33
|
"en": "dependencies updated\nFix npm publish",
|
|
8
34
|
"de": "aktualisierte abhängigkeiten\nNpm veröffentlichen",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Adapter przepisywany na maszynie",
|
|
68
94
|
"uk": "Переписка адаптера в Typescript",
|
|
69
95
|
"zh-cn": "用 Typescript 重写适配器"
|
|
70
|
-
},
|
|
71
|
-
"0.1.13": {
|
|
72
|
-
"en": "Dependencies updated\nmigrated to json5",
|
|
73
|
-
"de": "Ausgaben aktualisiert\nzu json5 migriert",
|
|
74
|
-
"ru": "Обновленные зависимости\nиммиграция в json5",
|
|
75
|
-
"pt": "Dependências atualizadas\nmigrado para json5",
|
|
76
|
-
"nl": "Afhankelijkheden bijgewerkt\ngemigreerd naar json5",
|
|
77
|
-
"fr": "Dépendances actualisées\nmigré vers json5",
|
|
78
|
-
"it": "Dipendenze aggiornate\nmigrato a json5",
|
|
79
|
-
"es": "Actualización de las dependencias\nmigrated to json5",
|
|
80
|
-
"pl": "Aktualizacja zależności\nmigrant do json5",
|
|
81
|
-
"uk": "Залежність оновлено\nмігрований в json5",
|
|
82
|
-
"zh-cn": "更新的依赖关系\n迁移到json5"
|
|
83
|
-
},
|
|
84
|
-
"0.1.12": {
|
|
85
|
-
"en": "Dependencies updated\nsmall fix",
|
|
86
|
-
"de": "Ausgaben aktualisiert\nkleine fix",
|
|
87
|
-
"ru": "Обновленные зависимости\nнебольшой ремонт",
|
|
88
|
-
"pt": "Dependências atualizadas\npequena correção",
|
|
89
|
-
"nl": "Afhankelijkheden bijgewerkt\nkleine fix",
|
|
90
|
-
"fr": "Dépendances actualisées\npetite fixation",
|
|
91
|
-
"it": "Dipendenze aggiornate\npiccola correzione",
|
|
92
|
-
"es": "Actualización de las dependencias\npequeño",
|
|
93
|
-
"pl": "Aktualizacja zależności\nmały fix",
|
|
94
|
-
"uk": "Залежність оновлено\nневелика фіксація",
|
|
95
|
-
"zh-cn": "更新的依赖关系\n小修补"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
],
|
|
163
163
|
"globalDependencies": [
|
|
164
164
|
{
|
|
165
|
-
"admin": ">=7.6.
|
|
165
|
+
"admin": ">=7.6.20"
|
|
166
166
|
}
|
|
167
167
|
]
|
|
168
168
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.gotify-ws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Gotify web socket for connection to various notification systems",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "simatec",
|
|
@@ -25,26 +25,25 @@
|
|
|
25
25
|
"url": "https://github.com/simatec/ioBroker.gotify-ws.git"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": ">=
|
|
28
|
+
"node": ">= 22"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@iobroker/adapter-core": "^3.3
|
|
32
|
-
"
|
|
33
|
-
"ws": "^8.18.3"
|
|
31
|
+
"@iobroker/adapter-core": "^3.4.3",
|
|
32
|
+
"ws": "^8.21.3"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@alcalzone/release-script": "^5.
|
|
37
|
-
"@alcalzone/release-script-plugin-iobroker": "^
|
|
38
|
-
"@alcalzone/release-script-plugin-license": "^
|
|
39
|
-
"@alcalzone/release-script-plugin-manual-review": "^
|
|
35
|
+
"@alcalzone/release-script": "^5.2.1",
|
|
36
|
+
"@alcalzone/release-script-plugin-iobroker": "^5.2.0",
|
|
37
|
+
"@alcalzone/release-script-plugin-license": "^5.2.2",
|
|
38
|
+
"@alcalzone/release-script-plugin-manual-review": "^5.2.0",
|
|
40
39
|
"@iobroker/adapter-dev": "^1.5.0",
|
|
41
|
-
"@iobroker/eslint-config": "^2.
|
|
42
|
-
"@iobroker/testing": "^5.
|
|
43
|
-
"@tsconfig/
|
|
40
|
+
"@iobroker/eslint-config": "^2.3.4",
|
|
41
|
+
"@iobroker/testing": "^5.3.0",
|
|
42
|
+
"@tsconfig/node22": "^22.0.6",
|
|
44
43
|
"@types/ws": "^8.18.1",
|
|
45
|
-
"rimraf": "^6.1.
|
|
44
|
+
"rimraf": "^6.1.3",
|
|
46
45
|
"ts-node": "^10.9.2",
|
|
47
|
-
"typescript": "
|
|
46
|
+
"typescript": "~6.0.3"
|
|
48
47
|
},
|
|
49
48
|
"main": "build/main.js",
|
|
50
49
|
"files": [
|
|
@@ -66,7 +65,8 @@
|
|
|
66
65
|
"www/",
|
|
67
66
|
"io-package.json",
|
|
68
67
|
"LICENSE",
|
|
69
|
-
"main.js"
|
|
68
|
+
"main.js",
|
|
69
|
+
"!CHANGELOG_OLD.md"
|
|
70
70
|
],
|
|
71
71
|
"scripts": {
|
|
72
72
|
"prebuild": "rimraf build",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Device ID": "Geräte ID",
|
|
3
|
-
"Discord Instance": "Discord-Instanz",
|
|
4
|
-
"Discord Target": "Discord-Ziel",
|
|
5
|
-
"E-Mail Instance": "E-Mail-Instanz",
|
|
6
|
-
"E-Mail Receiver": "E-Mail-Empfänger",
|
|
7
|
-
"E-Mail Sender": "E-Mail-Absender",
|
|
8
|
-
"Gotify IP or Domain": "Gotify IP oder Domain",
|
|
9
|
-
"Gotify Port": "Gotify-Port",
|
|
10
|
-
"Gotify Settings": "Gotify-Einstellungen",
|
|
11
|
-
"Gotify Token": "Gotify-Token",
|
|
12
|
-
"Gotify web socket for connection to various notification systems": "Gotify-Web-Socket zur Anbindung an verschiedene Benachrichtigungssysteme",
|
|
13
|
-
"If you like this project and would like to support its development, you are welcome to leave a donation.": "Wenn Ihnen dieses Projekt gefällt und Sie seine Entwicklung unterstützen möchten, können Sie gerne eine Spende hinterlassen.",
|
|
14
|
-
"Matrix Instance": "Matrix-Instanz",
|
|
15
|
-
"Notification Settings": "Benachrichtigungseinstellungen",
|
|
16
|
-
"Notification type": "Benachrichtigungstyp",
|
|
17
|
-
"Pushover Instance": "Pushover-Instanz",
|
|
18
|
-
"Signal Instance": "Signal-Instanz",
|
|
19
|
-
"Silent Notice": "Stille Mitteilung",
|
|
20
|
-
"Telegram Instance": "Telegram-Instanz",
|
|
21
|
-
"Telegram User": "Telegram-Benutzer",
|
|
22
|
-
"Whatsapp Instance": "WhatsApp-Instanz",
|
|
23
|
-
"gotify-ws adapter settings": "Adaptereinstellungen für gotify-ws",
|
|
24
|
-
"none": "keine",
|
|
25
|
-
"All Receiver": "Alle Empfänger"
|
|
26
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Device ID": "Device ID",
|
|
3
|
-
"Discord Instance": "Discord Instance",
|
|
4
|
-
"Discord Target": "Discord Target",
|
|
5
|
-
"E-Mail Instance": "E-Mail Instance",
|
|
6
|
-
"E-Mail Receiver": "E-Mail Receiver",
|
|
7
|
-
"E-Mail Sender": "E-Mail Sender",
|
|
8
|
-
"Gotify IP or Domain": "Gotify IP or Domain",
|
|
9
|
-
"Gotify Port": "Gotify Port",
|
|
10
|
-
"Gotify Settings": "Gotify Settings",
|
|
11
|
-
"Gotify Token": "Gotify Token",
|
|
12
|
-
"Gotify web socket for connection to various notification systems": "Gotify web socket for connection to various notification systems",
|
|
13
|
-
"If you like this project and would like to support its development, you are welcome to leave a donation.": "If you like this project and would like to support its development, you are welcome to leave a donation.",
|
|
14
|
-
"Matrix Instance": "Matrix Instance",
|
|
15
|
-
"Notification Settings": "Notification Settings",
|
|
16
|
-
"Notification-Manager Instance": "Notification-Manager Instance",
|
|
17
|
-
"Notification type": "Notification type",
|
|
18
|
-
"Pushover Instance": "Pushover Instance",
|
|
19
|
-
"Signal Instance": "Signal Instance",
|
|
20
|
-
"Silent Notice": "Silent notice",
|
|
21
|
-
"Telegram Instance": "Telegram Instance",
|
|
22
|
-
"Telegram User": "Telegram User",
|
|
23
|
-
"Whatsapp Instance": "Whatsapp Instance",
|
|
24
|
-
"gotify-ws adapter settings": "Adapter settings for gotify-ws",
|
|
25
|
-
"none": "none",
|
|
26
|
-
"All Receiver": "All Receiver"
|
|
27
|
-
}
|
package/admin/words.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*global systemDictionary:true */
|
|
2
|
-
/*
|
|
3
|
-
+===================== DO NOT MODIFY ======================+
|
|
4
|
-
| This file was generated by translate-adapter, please use |
|
|
5
|
-
| `translate-adapter adminLanguages2words` to update it. |
|
|
6
|
-
+===================== DO NOT MODIFY ======================+
|
|
7
|
-
*/
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
systemDictionary = {
|
|
11
|
-
"discordInstance": { "en": "", "de": "Discord Instance", "ru": "Discord Instance", "pt": "Discord Instance", "nl": "Discord Instance", "fr": "Discord Instance", "it": "Discord Instance", "es": "Discord Instance", "pl": "Discord Instance", "uk": "Екземпляр Discord", "zh-cn": "Discord Instance"},
|
|
12
|
-
"e-mailInstance": { "en": "", "de": "E-Mail Instance", "ru": "E-Mail Instance", "pt": "E-Mail Instance", "nl": "E-Mail Instance", "fr": "E-Mail Instance", "it": "E-Mail Instance", "es": "E-Mail Instance", "pl": "E-Mail Instance", "uk": "Примірник електронної пошти", "zh-cn": "E-Mail Instance"},
|
|
13
|
-
"gotify-ws adapter settings": { "en": "Adapter settings for gotify-ws", "de": "Adaptereinstellungen für gotify-ws", "ru": "Настройки адаптера для gotify-ws", "pt": "Configurações do adaptador para gotify-ws", "nl": "Adapterinstellingen voor gotify-ws", "fr": "Paramètres d'adaptateur pour gotify-ws", "it": "Impostazioni dell'adattatore per gotify-ws", "es": "Ajustes del adaptador para gotify-ws", "pl": "Ustawienia adaptera dla gotify-ws", "uk": "Налаштування адаптера для gotify-ws", "zh-cn": "gotify-ws的适配器设置"},
|
|
14
|
-
"matrixInstance": { "en": "", "de": "Matrix Instance", "ru": "Matrix Instance", "pt": "Matrix Instance", "nl": "Matrix Instance", "fr": "Matrix Instance", "it": "Matrix Instance", "es": "Matrix Instance", "pl": "Matrix Instance", "uk": "Екземпляр матриці", "zh-cn": "Matrix Instance"},
|
|
15
|
-
"notificationType": { "en": "Notification type", "de": "Notification type", "ru": "Notification type", "pt": "Notification type", "nl": "Notification type", "fr": "Notification type", "it": "Notification type", "es": "Notification type", "pl": "Notification type", "uk": "Тип сповіщення", "zh-cn": "Notification type"},
|
|
16
|
-
"pushoverInstance": { "en": "", "de": "Pushover Instance", "ru": "Pushover Instance", "pt": "Pushover Instance", "nl": "Pushover Instance", "fr": "Pushover Instance", "it": "Pushover Instance", "es": "Pushover Instance", "pl": "Pushover Instance", "uk": "Примірник Pushover", "zh-cn": "Pushover Instance"},
|
|
17
|
-
"signalInstance": { "en": "", "de": "Signal Instance", "ru": "Signal Instance", "pt": "Signal Instance", "nl": "Signal Instance", "fr": "Signal Instance", "it": "Signal Instance", "es": "Signal Instance", "pl": "Signal Instance", "uk": "Примірник сигналу", "zh-cn": "Signal Instance"},
|
|
18
|
-
"telegramInstance": { "en": "", "de": "Telegram Instance", "ru": "Telegram Instance", "pt": "Telegram Instance", "nl": "Telegram Instance", "fr": "Telegram Instance", "it": "Telegram Instance", "es": "Telegram Instance", "pl": "Telegram Instance", "uk": "Примірник Telegram", "zh-cn": "Telegram Instance"},
|
|
19
|
-
"token": { "en": "", "de": "Gotify Token", "ru": "Gotify Token", "pt": "Gotify Token", "nl": "Gotify Token", "fr": "Gotify Token", "it": "Gotify Token", "es": "Gotify Token", "pl": "Gotify Token", "uk": "Токен Gotify", "zh-cn": "Gotify Token"},
|
|
20
|
-
"url": { "en": "", "de": "Gotify URL with Port", "ru": "Gotify URL with Port", "pt": "Gotify URL with Port", "nl": "Gotify URL with Port", "fr": "Gotify URL with Port", "it": "Gotify URL with Port", "es": "Gotify URL with Port", "pl": "Gotify URL with Port", "uk": "Gotify URL-адреса з портом", "zh-cn": "Gotify URL with Port"},
|
|
21
|
-
"whatsappInstance": { "en": "", "de": "Whatsapp Instance", "ru": "Whatsapp Instance", "pt": "Whatsapp Instance", "nl": "Whatsapp Instance", "fr": "Whatsapp Instance", "it": "Whatsapp Instance", "es": "Whatsapp Instance", "pl": "Whatsapp Instance", "uk": "Екземпляр WhatsApp", "zh-cn": "Whatsapp Instance"},
|
|
22
|
-
"Discord Instance": { "en": "Discord Instance", "de": "Discord-Instanz", "ru": "Экземпляр Дискорда", "pt": "Instância de discórdia", "nl": "Discord-instantie", "fr": "Instance de discorde", "it": "Istanza della discordia", "es": "Instancia de discordia", "pl": "Instancja Discorda", "uk": "Екземпляр Discord", "zh-cn": "不和谐实例"},
|
|
23
|
-
"E-Mail Instance": { "en": "E-Mail Instance", "de": "E-Mail-Instanz", "ru": "Экземпляр электронной почты", "pt": "Instância de e-mail", "nl": "E-mailinstantie", "fr": "Instance de courrier électronique", "it": "Istanza di posta elettronica", "es": "Instancia de correo electrónico", "pl": "Instancja poczty elektronicznej", "uk": "Примірник електронної пошти", "zh-cn": "电子邮件实例"},
|
|
24
|
-
"Matrix Instance": { "en": "Matrix Instance", "de": "Matrixinstanz", "ru": "Экземпляр матрицы", "pt": "Instância de matriz", "nl": "Matrix-instantie", "fr": "Instance matricielle", "it": "Istanza della matrice", "es": "Instancia de matriz", "pl": "Instancja matrycy", "uk": "Екземпляр матриці", "zh-cn": "矩阵实例"},
|
|
25
|
-
"Pushover Instance": { "en": "Pushover Instance", "de": "Pushover-Instanz", "ru": "Пушоверный экземпляр", "pt": "Instância pushover", "nl": "Pushover-instantie", "fr": "Instance de transfert", "it": "Istanza push-over", "es": "Instancia fácil de convencer", "pl": "Instancja Pushover", "uk": "Примірник Pushover", "zh-cn": "推倒实例"},
|
|
26
|
-
"Signal Instance": { "en": "Signal Instance", "de": "Signalinstanz", "ru": "Экземпляр сигнала", "pt": "Instância de Sinal", "nl": "Signaalinstantie", "fr": "Instance de signal", "it": "Istanza del segnale", "es": "Instancia de señal", "pl": "Instancja sygnału", "uk": "Примірник сигналу", "zh-cn": "信号实例"},
|
|
27
|
-
"Telegram Instance": { "en": "Telegram Instance", "de": "Telegram-Instanz", "ru": "Экземпляр Телеграммы", "pt": "Instância de telegrama", "nl": "Telegram-instantie", "fr": "Instance de télégramme", "it": "Istanza di Telegramma", "es": "Instancia de telegrama", "pl": "Instancja telegramu", "uk": "Примірник Telegram", "zh-cn": "电报实例"},
|
|
28
|
-
"Gotify Token": { "en": "Gotify Token", "de": "Gotify-Token", "ru": "Токен Gotify", "pt": "Token Gotify", "nl": "Gotify-token", "fr": "Jeton Gotify", "it": "Gettone Getify", "es": "Token de gotificación", "pl": "Gotify token", "uk": "Токен Gotify", "zh-cn": "Gotify 代币"},
|
|
29
|
-
"Gotify IP or Domain": { "en": "Gotify IP or Domain", "de": "Gotify IP oder Domain", "ru": "Gotify IP или домен", "pt": "IP ou domínio Gotify", "nl": "Gotify IP of domein", "fr": "Gotify IP ou domaine", "it": "Gotify IP o dominio", "es": "Gotificar IP o Dominio", "pl": "Gotyfikuj adres IP lub domenę", "uk": "Gotify IP або домен", "zh-cn": "获取IP或域名"},
|
|
30
|
-
"Whatsapp Instance": { "en": "Whatsapp Instance", "de": "WhatsApp-Instanz", "ru": "Экземпляр WhatsApp", "pt": "Instância do Whatsapp", "nl": "Whatsapp-instantie", "fr": "Instance WhatsApp", "it": "Istanza di Whatsapp", "es": "Instancia de WhatsApp", "pl": "Instancja Whatsapp", "uk": "Екземпляр WhatsApp", "zh-cn": "Whatsapp 实例"},
|
|
31
|
-
"Gotify web socket for connection to various notification systems": {"en": "Gotify web socket for connection to various notification systems", "de": "Gotify-Web-Socket zur Anbindung an verschiedene Benachrichtigungssysteme", "ru": "Веб-сокет Gotify для подключения к различным системам уведомлений", "pt": "Soquete web Gotify para conexão com vários sistemas de notificação", "nl": "Gotify websocket voor verbinding met verschillende meldingssystemen", "fr": "Socket Web Gotify pour la connexion à divers systèmes de notification", "it": "Presa web Gotify per la connessione a vari sistemi di notifica", "es": "Socket web Gotify para conexión a varios sistemas de notificación", "pl": "Gniazdo sieciowe Gotify umożliwiające połączenie z różnymi systemami powiadomień", "uk": "Веб-сокет Gotify для підключення до різних систем сповіщень", "zh-cn": "Gotify Web 套接字用于连接各种通知系统"},
|
|
32
|
-
"Gotify Settings": { "en": "Gotify Settings", "de": "Gotify-Einstellungen", "ru": "Настройки Готифай", "pt": "Configurações do Gotify", "nl": "Gotify-instellingen", "fr": "Paramètres Gotify", "it": "Impostazioni di Gotify", "es": "Configuración de Gotify", "pl": "Ustawienia Gotify", "uk": "Налаштування Gotify", "zh-cn": "戈特化设置"},
|
|
33
|
-
"Gotify Port": { "en": "Gotify Port", "de": "Gotify-Port", "ru": "Готифай Порт", "pt": "Porto Gotify", "nl": "Gotify-poort", "fr": "Port Gotify", "it": "Porto Gotify", "es": "Puerto Gotify", "pl": "Gotify Port", "uk": "Порт Gotify", "zh-cn": "戈蒂菲港"},
|
|
34
|
-
"Notification Settings": { "en": "Notification Settings", "de": "Benachrichtigungseinstellungen", "ru": "Настройки уведомлений", "pt": "Configurações de notificação", "nl": "Notificatie instellingen", "fr": "Paramètres de notification", "it": "Impostazioni di notifica", "es": "Configuración de las notificaciones", "pl": "Ustawienia powiadomień", "uk": "Налаштування сповіщень", "zh-cn": "通知设置"},
|
|
35
|
-
"Notification type": { "en": "Notification type", "de": "Benachrichtigungstyp", "ru": "Тип уведомления", "pt": "Tipo de notificação", "nl": "Melding type", "fr": "Type de notification", "it": "Tipo di notifica", "es": "Tipo de notificación", "pl": "Typ powiadomienia", "uk": "Тип сповіщення", "zh-cn": "通知类型"},
|
|
36
|
-
"E-Mail Receiver": { "en": "E-Mail Receiver", "de": "E-Mail-Empfänger", "ru": "Получатель электронной почты", "pt": "Receptor de e-mail", "nl": "E-mailontvanger", "fr": "Récepteur de courrier électronique", "it": "Ricevitore di posta elettronica", "es": "Receptor de correo electrónico", "pl": "Odbiorca poczty elektronicznej", "uk": "Приймач електронної пошти", "zh-cn": "电子邮件接收器"},
|
|
37
|
-
"E-Mail Sender": { "en": "E-Mail Sender", "de": "E-Mail-Absender", "ru": "Отправитель электронной почты", "pt": "Remetente de e-mail", "nl": "E-mailafzender", "fr": "Expéditeur de courrier électronique", "it": "Mittente dell'e-mail", "es": "Remitente de correo electrónico", "pl": "Nadawca e-maila", "uk": "Відправник електронної пошти", "zh-cn": "电子邮件发送者"},
|
|
38
|
-
"Device ID": { "en": "Device ID", "de": "Geräte ID", "ru": "Идентификатор устройства", "pt": "ID de dispositivo", "nl": "Apparaat ID", "fr": "Reference de l'appareil", "it": "ID del dispositivo", "es": "ID del dispositivo", "pl": "Identyfikator urzadzenia", "uk": "ID пристрою", "zh-cn": "设备ID"},
|
|
39
|
-
"Silent Notice": { "en": "Silent notice", "de": "Stille Mitteilung", "ru": "Тихое уведомление", "pt": "Aviso silencioso", "nl": "Stille mededeling", "fr": "Avis silencieux", "it": "Avviso silenzioso", "es": "Aviso silencioso", "pl": "Ciche powiadomienie", "uk": "Мовчазне повідомлення", "zh-cn": "无声通知"},
|
|
40
|
-
"Discord Target": { "en": "Discord Target", "de": "Discord-Ziel", "ru": "Цель разногласий", "pt": "Alvo de discórdia", "nl": "Onenigheid Doel", "fr": "Cible de discorde", "it": "Obiettivo della discordia", "es": "Objetivo de discordia", "pl": "Cel niezgody", "uk": "Discord Target", "zh-cn": "不和谐目标"},
|
|
41
|
-
"Telegram User": { "en": "Telegram User", "de": "Telegram-Benutzer", "ru": "Пользователь Telegram", "pt": "Usuário do telegrama", "nl": "Telegram-gebruiker", "fr": "Utilisateur de télégramme", "it": "Utente Telegram", "es": "Usuario de Telegrama", "pl": "Użytkownik Telegramu", "uk": "Користувач Telegram", "zh-cn": "电报用户"},
|
|
42
|
-
"If you like this project and would like to support its development, you are welcome to leave a donation.": {"en": "If you like this project and would like to support its development, you are welcome to leave a donation.", "de": "Wenn Ihnen dieses Projekt gefällt und Sie seine Entwicklung unterstützen möchten, können Sie gerne eine Spende hinterlassen.", "ru": "Если вам нравится этот проект и вы хотите поддержать его развитие, вы можете оставить пожертвование.", "pt": "Se você gosta deste projeto e gostaria de apoiar seu desenvolvimento, fique à vontade para deixar uma doação.", "nl": "Als u dit project leuk vindt en de ontwikkeling ervan wilt ondersteunen, kunt u een donatie achterlaten.", "fr": "Si vous aimez ce projet et souhaitez soutenir son développement, n'hésitez pas à faire un don.", "it": "Se ti piace questo progetto e desideri sostenerne lo sviluppo, puoi lasciare una donazione.", "es": "Si te gusta este proyecto y te gustaría apoyar su desarrollo, puedes dejar una donación.", "pl": "Jeśli podoba Ci się ten projekt i chciałbyś wesprzeć jego rozwój, możesz zostawić darowiznę.", "uk": "Якщо вам подобається цей проект і ви хочете підтримати його розвиток, ви можете залишити пожертву.", "zh-cn": "如果您喜欢这个项目并愿意支持它的发展,欢迎您留下捐款。"},
|
|
43
|
-
};
|