Skip to content

Commit

Permalink
fix(kb.gbapp): Answers in text in case of Whatsapp channel.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Henrique (pragmatismo.io) committed Jul 18, 2019
1 parent efa860d commit 4f994b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/azuredeployer.gbapp/services/AzureDeployerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
keys = await this.cognitiveClient.accounts.listKeys(name, nlp.name);
const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);

instance.nlpEndpoint = nlp.endpoint;
instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
instance.nlpKey = keys.key1;
instance.nlpAppId = nlpAppId;

Expand Down Expand Up @@ -590,7 +590,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
id = app.id;
}

return id;
return id.replace(/\'/gi,'');
}

private async makeNlpRequest(
Expand Down
4 changes: 3 additions & 1 deletion packages/kb.gbapp/services/KBService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ export class KBService {
playerType: 'video',
data: answer.content
});
} else if (answer.content.length > 140 && step.context.activity.channelId === 'webchat') {
} else if (answer.content.length > 140 &&
step.context.activity.channelId === 'webchat' &&
GBConfigService.get('DISABLE_WEB') !== 'true') {
const locale = step.context.activity.locale;

await step.context.sendActivity(Messages[locale].will_answer_projector);
Expand Down

0 comments on commit 4f994b1

Please sign in to comment.