- FIX: Whastapp line now can be turned off;

- FIX: More error logging on BuildMin.
This commit is contained in:
Rodrigo Rodriguez 2018-05-27 18:15:33 -03:00
parent 70a9862d01
commit 81a1445a09
6 changed files with 19 additions and 8 deletions

View file

@ -1,5 +1,11 @@
# Release History # Release History
## Version 0.0.25
- FIX: Whastapp line now can be turned off;
- FIX: More error logging on BuildMin.
## Version 0.0.24 ## Version 0.0.24
- FIX: AskDialog compilation error. - FIX: AskDialog compilation error.

View file

@ -107,15 +107,16 @@ export class GBCoreService implements IGBCoreService {
} }
syncDatabaseStructure(cb) { syncDatabaseStructure(cb) {
if (GBConfigService.get("DATABASE_SYNC")) { if (GBConfigService.get("DATABASE_SYNC") === "true") {
logger.trace("Syncing database..."); logger.trace("Syncing database...");
this.sequelize.sync().then(value => { this.sequelize.sync().then(value => {
logger.trace("Database synced."); logger.trace("Database synced.");
cb(); cb();
}); });
} }
else{ else {
logger.trace("Database synchronization is disabled."); logger.trace("Database synchronization is disabled.");
cb();
} }
} }

View file

@ -462,6 +462,7 @@ export class GBMinService {
}); });
}); });
} catch (err) { } catch (err) {
logger.error(err);
reject(err) reject(err)
} }
}); });

View file

@ -54,9 +54,14 @@ export class GBWhatsappPackage implements IGBPackage {
} }
loadBot(min: GBMinInstance): void { loadBot(min: GBMinInstance): void {
// Only loads engine if it is defined on services.json.
if (min.instance.whatsappBotKey != "") {
this.channel = new WhatsappDirectLine(min.botId, min.instance.whatsappBotKey, min.instance.whatsappServiceKey, this.channel = new WhatsappDirectLine(min.botId, min.instance.whatsappBotKey, min.instance.whatsappServiceKey,
min.instance.whatsappServiceNumber, min.instance.whatsappServiceUrl, min.instance.whatsappServiceWebhookUrl); min.instance.whatsappServiceNumber, min.instance.whatsappServiceUrl, min.instance.whatsappServiceWebhookUrl);
} }
}
unloadBot(min: GBMinInstance): void { unloadBot(min: GBMinInstance): void {

View file

@ -1,6 +1,6 @@
{ {
"name": "botserver", "name": "botserver",
"version": "0.0.24", "version": "0.0.25",
"description": "General Bot Community Edition open-core server.", "description": "General Bot Community Edition open-core server.",
"contributors": [ "contributors": [
"Rodrigo Rodriguez <me@rodrigorodriguez.com>" "Rodrigo Rodriguez <me@rodrigorodriguez.com>"

View file

@ -103,7 +103,6 @@ export class GBServer {
logger.trace(`Loading sys package: ${e.name}...`); logger.trace(`Loading sys package: ${e.name}...`);
let p = Object.create(e.prototype) as IGBPackage; let p = Object.create(e.prototype) as IGBPackage;
p.loadPackage(core, core.sequelize); p.loadPackage(core, core.sequelize);
}); });
(async () => { (async () => {
@ -115,9 +114,8 @@ export class GBServer {
logger.info(`Instance loaded: ${instance.botId}...`); logger.info(`Instance loaded: ${instance.botId}...`);
}, server, appPackages); }, server, appPackages);
} catch (err) { } catch (err) {
logger.log(err) logger.info(err);
} }
})() })()