diff --git a/deploy/core.gbapp/services/GBMinService.ts b/deploy/core.gbapp/services/GBMinService.ts index e4239be3..9d55af70 100644 --- a/deploy/core.gbapp/services/GBMinService.ts +++ b/deploy/core.gbapp/services/GBMinService.ts @@ -141,7 +141,7 @@ export class GBMinService { let options = { url: - "https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken", + "https://api.cognitive.microsoft.com/sts/v1.0/issueToken", method: "POST", headers: { "Ocp-Apim-Subscription-Key": instance.speechKey @@ -191,9 +191,9 @@ export class GBMinService { GBKBPackage, GBCustomerSatisfactionPackage, GBWhatsappPackage].forEach(sysPackage => { logger.trace(`Loading sys package: ${sysPackage.name}...`); let p = Object.create(sysPackage.prototype) as IGBPackage; - p.loadBot(min); - e.sysPackages.push(p); + //e.sysPackages.push(p); if (sysPackage.name === "GBWhatsappPackage") { + p.loadBot(min); let url = "/instances/:botId/whatsapp"; server.post(url, (req, res) => { p["channel"].received(req, res); diff --git a/deploy/default.gbui/public/index.html b/deploy/default.gbui/public/index.html index 6d13aa1b..436ea80b 100644 --- a/deploy/default.gbui/public/index.html +++ b/deploy/default.gbui/public/index.html @@ -53,7 +53,7 @@ -
+
diff --git a/deploy/whatsapp.gblib/services/WhatsappDirectLine.ts b/deploy/whatsapp.gblib/services/WhatsappDirectLine.ts index 8ca02d13..44583d2e 100644 --- a/deploy/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/deploy/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -204,7 +204,7 @@ export class WhatsappDirectLine extends GBService { // Ignore own messages. // TODO: this.botId instead of "general-bot-9672a8d3" - activities = activities.filter((m) => { return m.from.id === "general-bot-9672a8d3" && m.type === "message" }); + activities = activities.filter((m) => { return (m.from.id === "GeneralBot-Netshoes" || m.from.id.includes("4vqtLx3cFJgBAELkRib2K8")) && m.type === "message" }); if (activities.length) { diff --git a/tsconfig.json b/tsconfig.json index 67fd63f7..b02300c9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, + "keyofStringsOnly": true, "mapRoot": "./dist/", "module": "commonjs", "moduleResolution": "node",