fix(basic.gblib): Step added to SendFileTo.

This commit is contained in:
Rodrigo Rodriguez 2021-03-08 18:36:59 -03:00
parent f40eae7b59
commit 85e96023c3
3 changed files with 18 additions and 105 deletions

View file

@ -1099,13 +1099,25 @@ export class GBMinService {
context.activity.originalText = originalText; context.activity.originalText = originalText;
GBLog.info(`Final text ready for NLP/Search/.gbapp: ${text}.`); GBLog.info(`Final text ready for NLP/Search/.gbapp: ${text}.`);
if (user.systemUser.agentMode === 'self') { if (user.systemUser.agentMode === 'self') {
const manualUser = await sec.getUserFromAgentSystemId(user.systemUser.userSystemId); const manualUser = await sec.getUserFromAgentSystemId(user.systemUser.userSystemId);
GBLog.info(`HUMAN AGENT (${user.systemUser.userSystemId}) TO USER ${manualUser.userSystemId}: ${text}`); GBLog.info(`HUMAN AGENT (${user.systemUser.userSystemId}) TO USER ${manualUser.userSystemId}: ${text}`);
await min.whatsAppDirectLine.sendToDeviceEx(manualUser.userSystemId, `${manualUser.agentSystemId}: ${text}`, locale);
const cmd = 'SEND FILE ';
if (text.startsWith(cmd)) {
const filename = text.substr(cmd.length);
const message = await min.kbService.getAnswerTextByMediaName(min.instance.instanceId, filename);
if (message === null) {
GBLog.error(`File ${filename} not found in any .gbkb published. Check the name or publish again the associated .gbkb.`);
} else {
await min.conversationalService.sendMarkdownToMobile(min, null, manualUser.userSystemId, message);
}
}
else {
await min.whatsAppDirectLine.sendToDeviceEx(manualUser.userSystemId, `${manualUser.agentSystemId}: ${text}`, locale);
}
} }
else { else {

View file

@ -1,99 +0,0 @@
[?25l[?25h[?25l[?25h
ajv 😍 UPDATE! Your local install is out of date. https://github.com/epoberezkin/ajv
npm install --save ajv@6.10.2 to go from 6.10.0 to 6.10.2
😕 NOTUSED? Still using ajv?
Depcheck did not find code similar to require('ajv') or import from 'ajv'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save ajv
botframework-directlinejs 😟 MISSING! Not installed.
botframework-webchat 😟 MISSING! Not installed.
😎 MINOR UP Minor update available. https://github.com/microsoft/BotFramework-WebChat/#readme
npm install --save botframework-webchat@4.7.1 to go from 4.6.0 to 4.7.1
deep-extend 😕 NOTUSED? Still using deep-extend?
Depcheck did not find code similar to require('deep-extend') or import from 'deep-extend'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save deep-extend
fetch 😟 MISSING! Not installed.
😕 NOTUSED? Still using fetch?
Depcheck did not find code similar to require('fetch') or import from 'fetch'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save fetch
msal 😟 MISSING! Not installed.
😎 MAJOR UP Major update available. https://github.com/AzureAD/microsoft-authentication-library-for-js#readme
npm install --save msal@1.2.0 to go from 0.2.4 to 1.2.0
powerbi-client 😟 MISSING! Not installed.
😕 NOTUSED? Still using powerbi-client?
Depcheck did not find code similar to require('powerbi-client') or import from 'powerbi-client'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save powerbi-client
react 😟 MISSING! Not installed.
😎 MINOR UP Minor update available. https://reactjs.org/
npm install --save react@16.12.0 to go from 16.11.0 to 16.12.0
react-dom 😟 MISSING! Not installed.
😎 MINOR UP Minor update available. https://reactjs.org/
npm install --save react-dom@16.12.0 to go from 16.11.0 to 16.12.0
react-helmet 😟 MISSING! Not installed.
react-player 😟 MISSING! Not installed.
😎 PATCH UP Patch update available. https://github.com/CookPete/react-player
npm install --save react-player@1.14.2 to go from 1.14.1 to 1.14.2
😕 NOTUSED? Still using react-player?
Depcheck did not find code similar to require('react-player') or import from 'react-player'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save react-player
react-powerbi 😟 MISSING! Not installed.
😕 NOTUSED? Still using react-powerbi?
Depcheck did not find code similar to require('react-powerbi') or import from 'react-powerbi'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save react-powerbi
react-scripts 😟 MISSING! Not installed.
😎 MAJOR UP Major update available. https://github.com/facebook/create-react-app#readme
npm install --save react-scripts@3.3.0 to go from 2.1.8 to 3.3.0
😕 NOTUSED? Still using react-scripts?
Depcheck did not find code similar to require('react-scripts') or import from 'react-scripts'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save react-scripts
react-transition-group 😟 MISSING! Not installed.
😎 MAJOR UP Major update available. https://github.com/reactjs/react-transition-group#readme
npm install --save react-transition-group@4.3.0 to go from 2.9.0 to 4.3.0
😕 NOTUSED? Still using react-transition-group?
Depcheck did not find code similar to require('react-transition-group') or import from 'react-transition-group'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save react-transition-group
rxjs 😍 UPDATE! Your local install is out of date. https://github.com/ReactiveX/RxJS
npm install --save rxjs@6.5.4 to go from 6.5.3 to 6.5.4
😕 NOTUSED? Still using rxjs?
Depcheck did not find code similar to require('rxjs') or import from 'rxjs'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save rxjs
url-join 😕 NOTUSED? Still using url-join?
Depcheck did not find code similar to require('url-join') or import from 'url-join'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save url-join
Use npm-check -u for interactive update.
[?25h

View file

@ -248,8 +248,8 @@ export class WhatsappDirectLine extends GBService {
await sec.updateHumanAgent(manualUser.userSystemId, this.min.instance.instanceId, null); await sec.updateHumanAgent(manualUser.userSystemId, this.min.instance.instanceId, null);
await sec.updateHumanAgent(user.agentSystemId, this.min.instance.instanceId, null); await sec.updateHumanAgent(user.agentSystemId, this.min.instance.instanceId, null);
} else { } else {
GBLog.info(`HUMAN AGENT (${id}) TO USER ${manualUser.userSystemId}: ${text}`); GBLog.info(`HUMAN AGENT (${manualUser.agentSystemId}) TO USER ${manualUser.userSystemId}: ${text}`);
await this.sendToDeviceEx(manualUser.userSystemId, `${manualUser.agentSystemId}: ${text}`, locale); await this.sendToDeviceEx(manualUser.userSystemId, `AGENTE: *${text}*`, locale);
} }
} }