fix(basic.gblib): SEND EMAIL body is now optional.
This commit is contained in:
parent
f52f52d716
commit
9b59146034
1 changed files with 18 additions and 13 deletions
|
@ -526,6 +526,11 @@ export class DialogKeywords {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public async sendEmail({ pid, to, subject, body }) {
|
public async sendEmail({ pid, to, subject, body }) {
|
||||||
|
|
||||||
|
if (!body) {
|
||||||
|
body = "";
|
||||||
|
};
|
||||||
|
|
||||||
// tslint:disable-next-line:no-console
|
// tslint:disable-next-line:no-console
|
||||||
|
|
||||||
GBLog.info(`[E-mail]: to:${to},subject: ${subject},body: ${body}.`);
|
GBLog.info(`[E-mail]: to:${to},subject: ${subject},body: ${body}.`);
|
||||||
|
@ -1247,9 +1252,9 @@ export class DialogKeywords {
|
||||||
|
|
||||||
public async messageBot({ pid, text }) {
|
public async messageBot({ pid, text }) {
|
||||||
const { min, user } = await DialogKeywords.getProcessInfo(pid);
|
const { min, user } = await DialogKeywords.getProcessInfo(pid);
|
||||||
GBLogEx.info(min,`MESSAGE BOT: ${text}.`);
|
GBLogEx.info(min, `MESSAGE BOT: ${text}.`);
|
||||||
|
|
||||||
const { conversation, client} = min['apiConversations'][pid];
|
const { conversation, client } = min['apiConversations'][pid];
|
||||||
|
|
||||||
await client.apis.Conversations.Conversations_PostActivity({
|
await client.apis.Conversations.Conversations_PostActivity({
|
||||||
conversationId: conversation.conversationId,
|
conversationId: conversation.conversationId,
|
||||||
|
@ -1377,10 +1382,10 @@ export class DialogKeywords {
|
||||||
);
|
);
|
||||||
GBLog.verbose(`Translated text(playMarkdown): ${text}.`);
|
GBLog.verbose(`Translated text(playMarkdown): ${text}.`);
|
||||||
|
|
||||||
if (step){
|
if (step) {
|
||||||
await min.conversationalService.sendText(min, step, text);
|
await min.conversationalService.sendText(min, step, text);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
await min.conversationalService['sendOnConversation'](min, user, text);
|
await min.conversationalService['sendOnConversation'](min, user, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue