@tiledesk/tiledesk-server 2.9.29 → 2.9.30
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/pubmodules/pubModulesManager.js +41 -41
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -33,11 +33,11 @@ class PubModulesManager {
|
|
33
33
|
this.telegram = undefined;
|
34
34
|
this.telegramRoute = undefined;
|
35
35
|
|
36
|
-
|
37
|
-
|
36
|
+
this.sms = undefined;
|
37
|
+
this.smsRoute = undefined;
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
this.voice = undefined;
|
40
|
+
this.voiceRoute = undefined;
|
41
41
|
|
42
42
|
this.mqttTest = undefined;
|
43
43
|
this.mqttTestRoute = undefined;
|
@@ -97,14 +97,14 @@ class PubModulesManager {
|
|
97
97
|
app.use('/modules/telegram', this.telegramRoute);
|
98
98
|
winston.info("PubModulesManager telegramRoute controller loaded");
|
99
99
|
}
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
100
|
+
if (this.smsRoute) {
|
101
|
+
app.use('/modules/sms', this.smsRoute);
|
102
|
+
winston.info("PubModulesManager smsRoute controller loaded");
|
103
|
+
}
|
104
|
+
if (this.voiceRoute) {
|
105
|
+
app.use('/modules/voice', this.voiceRoute);
|
106
|
+
winston.info("PubModulesManager voiceRoute controller loaded");
|
107
|
+
}
|
108
108
|
if (this.mqttTestRoute) {
|
109
109
|
app.use('/modules/mqttTest', this.mqttTestRoute);
|
110
110
|
winston.info("PubModulesManager mqttTestRoute controller loaded");
|
@@ -345,40 +345,40 @@ class PubModulesManager {
|
|
345
345
|
}
|
346
346
|
}
|
347
347
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
348
|
+
if (process.env.VOICE_TOKEN === process.env.VOICE_SECRET) {
|
349
|
+
try {
|
350
|
+
this.voice = require('./voice');
|
351
|
+
winston.info("this.voice: " + this.voice);
|
352
|
+
this.voice.listener.listen(config);
|
353
353
|
|
354
|
-
|
354
|
+
this.voiceRoute = this.voice.voiceRoute;
|
355
355
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
356
|
+
winston.info("PubModulesManager initialized apps (voice).")
|
357
|
+
} catch(err) {
|
358
|
+
console.log("\n Unable to start voice connector: ", err);
|
359
|
+
if (err.code == 'MODULE_NOT_FOUND') {
|
360
|
+
winston.info("PubModulesManager init apps module not found ");
|
361
|
+
} else {
|
362
|
+
winston.info("PubModulesManager error initializing init apps module", err);
|
363
|
+
}
|
364
|
+
}
|
365
|
+
}
|
366
366
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
367
|
+
try {
|
368
|
+
this.sms = require('./sms');
|
369
|
+
winston.info("this.sms: " + this.sms);
|
370
|
+
this.sms.listener.listen(config);
|
371
371
|
|
372
|
-
|
372
|
+
this.smsRoute = this.sms.smsRoute;
|
373
373
|
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
374
|
+
winston.info("PubModulesManager initialized apps (sms).")
|
375
|
+
} catch(err) {
|
376
|
+
if (err.code == 'MODULE_NOT_FOUND') {
|
377
|
+
winston.info("PubModulesManager init apps module not found ");
|
378
|
+
} else {
|
379
|
+
winston.info("PubModulesManager error initializing init apps module", err);
|
380
|
+
}
|
381
|
+
}
|
382
382
|
|
383
383
|
try {
|
384
384
|
this.mqttTest = require('./mqttTest');
|