fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
2 changed files with 5 additions and 4 deletions
Showing only changes of commit 255a10bdc3 - Show all commits

View file

@ -620,6 +620,7 @@ export class GBVMService extends GBService {
};
try{
await ensureTokens();
${code}
}
catch(e){
@ -954,8 +955,8 @@ export class GBVMService extends GBService {
try {
let {token, expiresOn} = await sys.getCustomToken({pid, tokenName});
variables[token] = token;
variables[token + '_expiresOn'] = expiresOn;
variables[tokenName] = token;
variables[tokenName + '_expiresOn'] = expiresOn;
} catch (error) {

View file

@ -1670,10 +1670,10 @@ export class SystemKeywords {
return res;
}
public async getCustomToken({ pid, token: tokenName }) {
public async getCustomToken({ pid, tokenName }) {
const { min } = await DialogKeywords.getProcessInfo(pid);
GBLogEx.info(min, `GET TOKEN: ${tokenName}`);
GBLogEx.info(min, `BASIC internal getCustomToken: ${tokenName}`);
const token = await (min.adminService as any)['acquireElevatedToken']
(min.instance.instanceId, false,