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

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 6eb9d6cbf4 - Show all commits

View file

@ -52,6 +52,7 @@ import Path from 'path';
import PasswordGenerator from 'strict-password-generator'; import PasswordGenerator from 'strict-password-generator';
import crypto from 'crypto'; import crypto from 'crypto';
import Fs from 'fs'; import Fs from 'fs';
import { GBServer } from '../../../src/app.js';
/** /**
* Services for server administration. * Services for server administration.
@ -247,10 +248,8 @@ export class GBAdminService implements IGBAdminService {
} }
public async acquireElevatedToken (instanceId: number): Promise<string> { public async acquireElevatedToken (instanceId: number): Promise<string> {
// TODO: Use boot bot as base for authentication. const minBoot = GBServer.globals.minBoot as any;
instanceId = minBoot.instanceId;
const botId = GBConfigService.get('BOT_ID');
instanceId = (await this.core.loadInstanceByBotId(botId)).instanceId;
return new Promise<string>(async (resolve, reject) => { return new Promise<string>(async (resolve, reject) => {
const instance = await this.core.loadInstanceById(instanceId); const instance = await this.core.loadInstanceById(instanceId);