fix(basic.gblib): SET PAGED keyword #377.

This commit is contained in:
Rodrigo Rodriguez 2023-10-26 09:51:23 -03:00
parent d18ae6c511
commit afdb3c86b1
2 changed files with 12 additions and 15 deletions

View file

@ -958,12 +958,12 @@ export class DialogKeywords {
result = value;
} else if (kind === 'name') {
const extractEntity = text => {
return text.match(/[_a-zA-Z][_a-zA-Z0-9]{0,16}/gi);
return text.match(/[_a-zA-Z][_a-zA-Z0-9]{0,30}/gi);
};
const value = extractEntity(answer);
if (value === null || value.length != 1) {
if (value === null || value.length == 1) {
await this.talk({ pid, text: 'Por favor, digite um nome válido.' });
return await this.hear({ pid, kind, args });
}

View file

@ -259,9 +259,8 @@ export class GBVMService extends GBService {
let obj1 = t.fields[key];
let obj2 = model['fieldRawAttributesMap'][key];
if (key !== "id"){
if (obj1 && obj2)
{
if (key !== "id") {
if (obj1 && obj2) {
equals++;
}
}
@ -277,14 +276,13 @@ export class GBVMService extends GBService {
// New table checking, if needs sync.
let found = false;
tables[0].forEach ((storageTable)=>{
if (storageTable['table_name'] === t.name)
{
tables[0].forEach((storageTable) => {
if (storageTable['table_name'] === t.name) {
found = true;
}
});
sync = sync? sync: !found;
sync = sync ? sync : !found;
});
@ -311,8 +309,7 @@ export class GBVMService extends GBService {
});
GBLogEx.info(min, `BASIC: Done sync for ${min.botId} storage tables...`);
}
else
{
else {
GBLogEx.verbose(min, `BASIC: TABLE keywords already up to date (${min.botId})...`);
}
}