diff --git a/package-lock.json b/package-lock.json index d8b7fe3524c..b2213e14361 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1722,7 +1722,7 @@ "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" }, "@protobufjs/base64": { "version": "1.1.2", @@ -1737,12 +1737,12 @@ "@protobufjs/eventemitter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" }, "@protobufjs/fetch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" @@ -1751,27 +1751,27 @@ "@protobufjs/float": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" }, "@protobufjs/inquire": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" }, "@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" }, "@protobufjs/pool": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" }, "@protobufjs/utf8": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@selderee/plugin-htmlparser2": { "version": "0.6.0", @@ -2641,9 +2641,9 @@ } }, "@tiledesk/tiledesk-whatsapp-connector": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/@tiledesk/tiledesk-whatsapp-connector/-/tiledesk-whatsapp-connector-0.1.29.tgz", - "integrity": "sha512-b6rIUhH+PKPVr6UuDpbLwSWYbFDOJCDZ7Z9/y2iQUB3F65uF3aaQ7l9MBhJzHJb2+8y5crzWkZiCli/YocAU1A==", + "version": "0.1.30", + "resolved": "https://registry.npmjs.org/@tiledesk/tiledesk-whatsapp-connector/-/tiledesk-whatsapp-connector-0.1.30.tgz", + "integrity": "sha512-lu6wiYHMXZmMmBelGURkGa6pDDAhXQ/NMpzsiOsKUssnIIhAbRiehsPTiAGXHUT3ozg6M3qRBZKQ/YX8ue6XzQ==", "requires": { "@tiledesk/tiledesk-client": "^0.8.29", "@tiledesk/tiledesk-kvbasemongo": "^1.0.0", @@ -5947,7 +5947,7 @@ "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "optional": true }, "entities": { @@ -6698,7 +6698,7 @@ "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "optional": true }, "functions-have-names": { @@ -8748,12 +8748,12 @@ "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, "lodash.defaults": { "version": "4.2.0", @@ -9001,7 +9001,7 @@ "lru-cache": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", - "integrity": "sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw==", + "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", "requires": { "pseudomap": "^1.0.1", "yallist": "^2.0.0" @@ -12285,7 +12285,7 @@ "stubs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", + "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=", "optional": true }, "superagent": { @@ -13286,7 +13286,7 @@ "xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==" + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" }, "xtend": { "version": "4.0.2", diff --git a/package.json b/package.json index d1f3755b593..aa2fd64a0ba 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@tiledesk/tiledesk-kaleyra-proxy": "^0.1.6", "@tiledesk/tiledesk-rasa-connector": "^1.0.10", "@tiledesk/tiledesk-tybot-connector": "^0.1.55", - "@tiledesk/tiledesk-whatsapp-connector": "^0.1.29", + "@tiledesk/tiledesk-whatsapp-connector": "^0.1.30", "amqplib": "^0.5.5", "app-root-path": "^3.0.0", "bcrypt-nodejs": "0.0.3", diff --git a/pubmodules/whatsapp/listener.js b/pubmodules/whatsapp/listener.js index 8b5df1e9d7a..3a1f33d531a 100644 --- a/pubmodules/whatsapp/listener.js +++ b/pubmodules/whatsapp/listener.js @@ -13,29 +13,17 @@ class Listener { winston.debug("whatsapp config databaseUri: " + config.databaseUri); } - // Johnny - let port = process.env.REDIS_PORT; - winston.debug("Redis port: "+ port); + var port = process.env.CACHE_REDIS_PORT || 6379; + winston.debug("-Redis port: "+ port); - let host = process.env.REDIS_HOST; - winston.debug("Redis host: "+ host); + var host = process.env.CACHE_REDIS_HOST || "127.0.0.1" + winston.debug("-Redis host: "+ host); - let password = process.env.REDIS_PASSWORD; - winston.debug("Redis password: "+ password); - // Johnny - END + var password = process.env.REDIS_PASSWORD; + winston.debug("-Redis password: "+ password); - // Andrea - // var port = process.env.CACHE_REDIS_PORT || 6379; - // winston.info("-Redis port: "+ port); - // var host = process.env.CACHE_REDIS_HOST || "127.0.0.1" - // winston.info("-Redis host: "+ host); - - // var password = process.env.CACHE_REDIS_PASSWORD; - // winston.info("-Redis password: "+ password); - // Andrea - END - - let graph_url = process.env.GRAPH_URL || config.graphUrl || "https://graph.facebook.com/v14.0/" + let graph_url = process.env.META_GRAPH_URL || config.graphUrl || "https://graph.facebook.com/v14.0/" winston.debug("Whatsapp graph_url: "+ password); let log = process.env.WHATSAPP_LOG || false