Skip to content

Commit

Permalink
fix(basic.gblib): Startup duplicated messages removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed May 22, 2021
1 parent f62e68f commit fcc8ce5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
20 changes: 1 addition & 19 deletions packages/basic.gblib/services/SystemKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,24 +265,6 @@ export class SystemKeywords {
return val;
}

/**
* Finds a value or multi-value results in a tabular file.
*
* @example
*
* rows = FIND "file.xlsx", "A2=active" WHEN NOT FOUND TALK ""
* i = 1
* do while i < ubound(row)
* row = rows[i]
* send sms to "+" + row.mobile, "Hello " + row.namee + "! "
* loop
*
*/
public async findWithExit(file: string, talk, ...args): Promise<any> {
this.find(file, args);
}


/**
* Finds a value or multi-value results in a tabular file.
*
Expand Down Expand Up @@ -354,7 +336,7 @@ export class SystemKeywords {

// Filter results action.

if (result && result.toLowerCase() === value.toLowerCase()) {
if (result && result.toLowerCase().trim() === value.toLowerCase().trim()) {
let row = {};
const xlRow = results.text[foundIndex];
for (let colIndex = 0; colIndex < xlRow.length; colIndex++) {
Expand Down
9 changes: 6 additions & 3 deletions packages/core.gbapp/services/GBMinService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,11 @@ export class GBMinService {
GBLog.info(`User>: text:${context.activity.text} (type: ${context.activity.type}, name: ${context.activity.name}, channelId: ${context.activity.channelId}, value: ${context.activity.value})`);

// Answer to specific BOT Framework event conversationUpdate to auto start dialogs.
// Skips if the bot is talking.

if (context.activity.type === 'conversationUpdate' && context.activity.membersAdded.length > 0) {
if (context.activity.type === 'conversationUpdate' &&
context.activity.membersAdded.length > 0 &&
context.activity.membersAdded[0].id.indexOf(min.botId) == -1) {

// Check if a bot or a human participant is being added to the conversation.

Expand Down Expand Up @@ -1111,8 +1114,8 @@ export class GBMinService {
});
}
step.context.activity['text'] = text;
step.context.activity['originalText']= originalText;
step.context.activity['originalText'] = originalText;

GBLog.info(`Final text ready for NLP/Search/.gbapp: ${text}.`);

if (user.systemUser.agentMode === 'self') {
Expand Down

0 comments on commit fcc8ce5

Please sign in to comment.