fix(basic.gblib): OPEN keyword fix. Magic number removal.
This commit is contained in:
parent
482904672f
commit
fe2af84b21
1 changed files with 7 additions and 3 deletions
|
@ -58,11 +58,16 @@ import mammoth from 'mammoth';
|
||||||
import qrcode from 'qrcode';
|
import qrcode from 'qrcode';
|
||||||
import { json } from 'body-parser';
|
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.
|
* Base services of conversation to be called by BASIC.
|
||||||
*/
|
*/
|
||||||
export class DialogKeywords {
|
export class DialogKeywords {
|
||||||
/**
|
/**
|
||||||
* Reference to minimal bot instance.
|
* Reference to minimal bot instance.
|
||||||
*/
|
*/
|
||||||
public min: GBMinInstance;
|
public min: GBMinInstance;
|
||||||
|
@ -86,7 +91,6 @@ export class DialogKeywords {
|
||||||
* The number used in this execution for HEAR calls (useful for SET SCHEDULE).
|
* The number used in this execution for HEAR calls (useful for SET SCHEDULE).
|
||||||
*/
|
*/
|
||||||
hrOn: string;
|
hrOn: string;
|
||||||
|
|
||||||
userId: GuaribasUser;
|
userId: GuaribasUser;
|
||||||
debugWeb: boolean;
|
debugWeb: boolean;
|
||||||
lastDebugWeb: Date;
|
lastDebugWeb: Date;
|
||||||
|
@ -805,7 +809,7 @@ export class DialogKeywords {
|
||||||
min.cbMap[userId]['promise'] = '!GBHEAR';
|
min.cbMap[userId]['promise'] = '!GBHEAR';
|
||||||
|
|
||||||
while (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;
|
const text = min.cbMap[userId].promise;
|
||||||
|
|
Loading…
Add table
Reference in a new issue