fix(all): Fixing bugs of 3.0
This commit is contained in:
parent
d9f8cbd8a9
commit
6cad39d8c7
4 changed files with 54 additions and 875 deletions
|
@ -256,7 +256,7 @@ export class GBMinService {
|
|||
GBServer.globals.sysPackages,
|
||||
GBServer.globals.appPackages
|
||||
);
|
||||
min['groupCache'] = await KBService.getGroupReplies(instance.instanceId);
|
||||
//TODO: min['groupCache'] = await KBService.getGroupReplies(instance.instanceId);
|
||||
GBServer.globals.minInstances.push(min);
|
||||
|
||||
await this.deployer.deployPackage(min, 'packages/default.gbtheme');
|
||||
|
@ -296,7 +296,7 @@ export class GBMinService {
|
|||
|
||||
// Loads Named Entity data for this bot.
|
||||
|
||||
await KBService.RefreshNER(min);
|
||||
// TODO: await KBService.RefreshNER(min);
|
||||
|
||||
// Calls the loadBot context.activity for all packages.
|
||||
|
||||
|
@ -649,7 +649,7 @@ export class GBMinService {
|
|||
min.sandBoxMap = {};
|
||||
min['scheduleMap'] = {};
|
||||
min['conversationWelcomed'] = {};
|
||||
min['nerEngine'] = new nlp.default.NerManager();
|
||||
min['nerEngine'] = new nlp.NlpManager(); // TODO: migrate to MerManager.
|
||||
min.packages = sysPackages;
|
||||
min.appPackages = appPackages;
|
||||
|
||||
|
@ -710,16 +710,18 @@ export class GBMinService {
|
|||
await min.whatsAppDirectLine.setup(true);
|
||||
} else {
|
||||
const minBoot = GBServer.globals.minBoot as any;
|
||||
min.whatsAppDirectLine = new WhatsappDirectLine(
|
||||
min,
|
||||
min.botId,
|
||||
min.instance.whatsappBotKey,
|
||||
minBoot.instance.whatsappServiceKey,
|
||||
minBoot.instance.whatsappServiceNumber,
|
||||
minBoot.instance.whatsappServiceUrl,
|
||||
group
|
||||
);
|
||||
await min.whatsAppDirectLine.setup(false);
|
||||
if(minBoot.whatsappServiceKey){
|
||||
min.whatsAppDirectLine = new WhatsappDirectLine(
|
||||
min,
|
||||
min.botId,
|
||||
min.instance.whatsappBotKey,
|
||||
minBoot.instance.whatsappServiceKey,
|
||||
minBoot.instance.whatsappServiceNumber,
|
||||
minBoot.instance.whatsappServiceUrl,
|
||||
group
|
||||
);
|
||||
await min.whatsAppDirectLine.setup(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Setups default BOT Framework dialogs.
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -63,8 +63,9 @@ export class GuaribasUser extends Model<GuaribasUser> {
|
|||
@Column(DataType.STRING(255))
|
||||
displayName: string;
|
||||
|
||||
@Column(DataType.INTEGER)
|
||||
@Column(DataType.STRING(255))
|
||||
userSystemId: string;
|
||||
|
||||
@Column(DataType.STRING(255))
|
||||
userName: string;
|
||||
|
||||
|
|
|
@ -112,6 +112,7 @@ export class GBServer {
|
|||
|
||||
// Creates working directory.
|
||||
|
||||
process.env.PWD = process.cwd();
|
||||
const workDir = Path.join(process.env.PWD, 'work');
|
||||
if (!Fs.existsSync(workDir)) {
|
||||
mkdirp.sync(workDir);
|
||||
|
|
Loading…
Add table
Reference in a new issue