fix(core.gbapp): Translator off for two char phrases.

This commit is contained in:
Rodrigo Rodriguez 2022-08-26 11:53:47 -03:00
parent f5826e1f0d
commit bd20312bad
2 changed files with 4 additions and 2 deletions

View file

@ -122,7 +122,7 @@ export class AdminDialog extends IGBDialog {
},
async step => {
const locale = step.context.activity.locale;
const sensitive = step.result;
const sensitive = step.context.activity['originalText'];
if (sensitive === min.instance.adminPass) {
await min.conversationalService.sendText(min, step, Messages[locale].welcome);

View file

@ -327,7 +327,7 @@ export class GBConversationalService {
await min.whatsAppDirectLine.sendToDevice(mobile, message, conversationId);
}
public static async getAudioBufferFromText(text): Promise<string> {
return new Promise<string>(async (resolve, reject) => {
const name = GBAdminService.getRndReadableIdentifier();
@ -851,6 +851,8 @@ export class GBConversationalService {
if (text.length > 5000) {
text = text.substr(0, 4999);
GBLog.warn(`Text that bot will translate will be truncated due to MSFT service limitations.`);
} else if (text.length == 2) {
return text;
}
text = text.replace('¿', '');