File tree Expand file tree Collapse file tree 4 files changed +131
-63
lines changed Expand file tree Collapse file tree 4 files changed +131
-63
lines changed Original file line number Diff line number Diff line change 4444 "@tiledesk/tiledesk-kaleyra-proxy" : " ^0.1.6" ,
4545 "@tiledesk/tiledesk-rasa-connector" : " ^1.0.10" ,
4646 "@tiledesk/tiledesk-tybot-connector" : " ^0.1.55" ,
47- "@tiledesk/tiledesk-whatsapp-connector" : " ^0.1.19 " ,
47+ "@tiledesk/tiledesk-whatsapp-connector" : " ^0.1.24 " ,
4848 "amqplib" : " ^0.5.5" ,
4949 "app-root-path" : " ^3.0.0" ,
5050 "bcrypt-nodejs" : " 0.0.3" ,
Original file line number Diff line number Diff line change @@ -13,17 +13,21 @@ class Listener {
1313 winston . debug ( "kaleyra config databaseUri: " + config . databaseUri ) ;
1414 }
1515
16- kaleyra . startApp ( {
17- MONGODB_URL : config . databaseUri ,
18- API_URL : apiUrl ,
19- BASE_URL : apiUrl + "/modules/kaleyra" ,
20- APPS_API_URL : apiUrl + "/modules/apps" ,
21- KALEYRA_API_URL : process . env . KALEYRA_API_URL ,
22- API_KEY : process . env . API_KEY ,
23- log : process . env . KALEYRA_LOG
24- } , ( ) => {
25- winston . info ( "Tiledesk Kaleyra proxy server succesfully started." ) ;
26- } )
16+ if ( ! process . env . KALEYRA_API_URL || ! process . env . API_KEY ) {
17+ winston . info ( "Skip Kaleyra startApp" )
18+ } else {
19+ kaleyra . startApp ( {
20+ MONGODB_URL : config . databaseUri ,
21+ API_URL : apiUrl ,
22+ BASE_URL : apiUrl + "/modules/kaleyra" ,
23+ APPS_API_URL : apiUrl + "/modules/apps" ,
24+ KALEYRA_API_URL : process . env . KALEYRA_API_URL ,
25+ API_KEY : process . env . API_KEY ,
26+ log : process . env . KALEYRA_LOG
27+ } , ( ) => {
28+ winston . info ( "Tiledesk Kaleyra proxy server succesfully started." ) ;
29+ } )
30+ }
2731 }
2832}
2933
Original file line number Diff line number Diff line change @@ -13,16 +13,20 @@ class Listener {
1313 winston . debug ( "whatsapp config databaseUri: " + config . databaseUri ) ;
1414 }
1515
16- whatsapp . startApp ( {
17- MONGODB_URL : config . databaseUri ,
18- API_URL : apiUrl ,
19- GRAPH_URL : process . env . META_GRAPH_URL || config . graphUrl ,
20- BASE_URL : apiUrl + "/modules/whatsapp" ,
21- APPS_API_URL : apiUrl + "/modules/apps" ,
22- log : process . env . WHATSAPP_LOG
23- } , ( ) => {
24- winston . info ( "Tiledesk WhatsApp Connector proxy server succesfully started." ) ;
25- } )
16+ if ( ! process . env . GRAPH_URL || ! config . graphUrl ) {
17+ winston . info ( "Skip WhatsApp startApp" )
18+ } else {
19+ whatsapp . startApp ( {
20+ MONGODB_URL : config . databaseUri ,
21+ API_URL : apiUrl ,
22+ GRAPH_URL : process . env . META_GRAPH_URL || config . graphUrl ,
23+ BASE_URL : apiUrl + "/modules/whatsapp" ,
24+ APPS_API_URL : apiUrl + "/modules/apps" ,
25+ log : process . env . WHATSAPP_LOG
26+ } , ( ) => {
27+ winston . info ( "Tiledesk WhatsApp Connector proxy server succesfully started." ) ;
28+ } )
29+ }
2630
2731 }
2832}
You can’t perform that action at this time.
0 commit comments