fix(kb.gbapp): Answers in text in case of Whatsapp channel.

This commit is contained in:
Paulo Henrique (pragmatismo.io) 2019-07-18 18:15:45 -03:00
parent efa860d98c
commit 4f994b1e79
2 changed files with 5 additions and 3 deletions

View file

@ -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;
@ -590,7 +590,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
id = app.id;
}
return id;
return id.replace(/\'/gi,'');
}
private async makeNlpRequest(

View file

@ -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);