Skip to content

Commit

Permalink
fix(basic.gblib): OPEN keyword fix. Magic number removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan committed Jan 26, 2023
1 parent 4829046 commit fe2af84
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/basic.gblib/services/DialogKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,17 @@ import sgMail from '@sendgrid/mail';
import mammoth from 'mammoth';
import qrcode from 'qrcode';
import { json } from 'body-parser';

/**
* Default check interval for user replay
*/
const DEFAULT_HEAR_POLL_INTERVAL = 500;

/**
* Base services of conversation to be called by BASIC.
*/
export class DialogKeywords {
/**
/**
* Reference to minimal bot instance.
*/
public min: GBMinInstance;
Expand All @@ -86,7 +91,6 @@ export class DialogKeywords {
* The number used in this execution for HEAR calls (useful for SET SCHEDULE).
*/
hrOn: string;

userId: GuaribasUser;
debugWeb: boolean;
lastDebugWeb: Date;
Expand Down Expand Up @@ -805,7 +809,7 @@ export class DialogKeywords {
min.cbMap[userId]['promise'] = '!GBHEAR';

while (min.cbMap[userId].promise === '!GBHEAR') {
await sleep(500);
await sleep(DEFAULT_HEAR_POLL_INTERVAL);
}

const text = min.cbMap[userId].promise;
Expand Down

0 comments on commit fe2af84

Please sign in to comment.