Enforce user file types at runtime

This commit is contained in:
Pavel Djundik 2019-12-15 17:29:39 +02:00
parent f269ac3bee
commit 2365c9489e
2 changed files with 3 additions and 4 deletions

View file

@ -62,6 +62,9 @@ function Client(manager, name, config = {}) {
const client = this;
client.config.log = Boolean(client.config.log);
client.config.password = String(client.config.password);
if (!Helper.config.public && client.config.log) {
if (Helper.config.messageStorage.includes("sqlite")) {
client.messageStorage.push(new MessageStorage(client));

View file

@ -134,10 +134,6 @@ ClientManager.prototype.addUser = function(name, password, enableLog) {
const user = {
password: password || "",
log: enableLog,
networks: [],
sessions: {},
clientSettings: {},
browser: {},
};
try {