fix(basic.gblib): executionid and changed to pid and security context for HEAR(#322).

This commit is contained in:
Alan Perdomo 2023-01-19 10:47:47 -03:00
parent 1063739cbe
commit 9820bb3f7a
2 changed files with 4 additions and 4 deletions

View file

@ -722,7 +722,7 @@ export class DialogKeywords {
const process = GBServer.globals.processes[pid]; const process = GBServer.globals.processes[pid];
let { let {
min, user min, user
} = await this.getProcessInfo(pid); } = await DialogKeywords.getProcessInfo(pid);
// Handles first arg as an array of args. // Handles first arg as an array of args.
@ -1038,7 +1038,7 @@ export class DialogKeywords {
} }
} }
public async getProcessInfo(pid: number) { public static async getProcessInfo(pid: number) {
const proc = GBServer.globals.processes[pid]; const proc = GBServer.globals.processes[pid];
const min = GBServer.globals.minInstances.filter(p => const min = GBServer.globals.minInstances.filter(p =>
@ -1058,7 +1058,7 @@ export class DialogKeywords {
GBLog.info(`BASIC: TALK '${text}'.`); GBLog.info(`BASIC: TALK '${text}'.`);
const { const {
min, user min, user
} = await this.getProcessInfo(pid); } = await DialogKeywords.getProcessInfo(pid);
if (user) { if (user) {
// TODO: const translate = this.user ? this.user.basicOptions.translatorOn : false; // TODO: const translate = this.user ? this.user.basicOptions.translatorOn : false;

View file

@ -481,7 +481,7 @@ export class SystemKeywords {
}); });
if (!documents || documents.length === 0) { if (!documents || documents.length === 0) {
throw `File '${file}' specified on GBasic command not found. Check the .gbdata or the .gbdialog associated.`; throw `File '${file}' specified on GBasic command not found. Check the .gbdata or the .gb'dialog' associated.`;
} }
return documents[0]; return documents[0];