Remove override of UserConfig
This commit is contained in:
parent
d58fb84565
commit
320075e376
@ -78,6 +78,7 @@ export type UserConfig = {
|
||||
hostname?: string;
|
||||
isSecure?: boolean;
|
||||
};
|
||||
networks?: NetworkConfig[];
|
||||
};
|
||||
|
||||
export type Mention = {
|
||||
@ -95,9 +96,7 @@ class Client {
|
||||
attachedClients!: {
|
||||
[socketId: string]: {token: string; openChannel: number};
|
||||
};
|
||||
config!: UserConfig & {
|
||||
networks?: NetworkConfig[];
|
||||
};
|
||||
config!: UserConfig;
|
||||
id!: number;
|
||||
idMsg!: number;
|
||||
idChan!: number;
|
||||
@ -112,11 +111,7 @@ class Client {
|
||||
|
||||
fileHash!: string;
|
||||
|
||||
constructor(
|
||||
manager: ClientManager,
|
||||
name?: string,
|
||||
config = {} as UserConfig & {networks: NetworkConfig[]}
|
||||
) {
|
||||
constructor(manager: ClientManager, name?: string, config = {} as UserConfig) {
|
||||
_.merge(this, {
|
||||
awayMessage: "",
|
||||
lastActiveChannel: -1,
|
||||
|
@ -285,7 +285,7 @@ class ClientManager {
|
||||
|
||||
try {
|
||||
const data = fs.readFileSync(userPath, "utf-8");
|
||||
return JSON.parse(data) as UserConfig & {networks: NetworkConfig[]};
|
||||
return JSON.parse(data) as UserConfig;
|
||||
} catch (e: any) {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
log.error(`Failed to read user ${colors.bold(name)}: ${e}`);
|
||||
|
Loading…
Reference in New Issue
Block a user