mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-05 04:07:23 +02:00
More conversion to UserProps
This commit is contained in:
parent
b82c640014
commit
4050affedf
20 changed files with 123 additions and 95 deletions
|
@ -13,7 +13,9 @@ const Errors = require('./enig_error.js').Errors;
|
|||
const ErrorReasons = require('./enig_error.js').ErrorReasons;
|
||||
const Events = require('./events.js');
|
||||
const AnsiPrep = require('./ansi_prep.js');
|
||||
const UserProps = require('./user_property.js');
|
||||
|
||||
// deps
|
||||
const fs = require('graceful-fs');
|
||||
const paths = require('path');
|
||||
const async = require('async');
|
||||
|
@ -427,8 +429,8 @@ function getThemeArt(options, cb) {
|
|||
// random
|
||||
//
|
||||
const config = Config();
|
||||
if(!options.themeId && _.has(options, 'client.user.properties.theme_id')) {
|
||||
options.themeId = options.client.user.properties.theme_id;
|
||||
if(!options.themeId && _.has(options, [ 'client', 'user', 'properties', UserProps.ThemeId ])) {
|
||||
options.themeId = options.client.user.properties[UserProps.ThemeId];
|
||||
} else {
|
||||
options.themeId = config.theme.default;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue