Skip to content

Commit

Permalink
actually send networks to clients
Browse files Browse the repository at this point in the history
  • Loading branch information
f0x52 committed Oct 8, 2024
1 parent b48e7dc commit fa60ba2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ function getClientConfiguration(data: AuthPerformData): SharedConfiguration | Lo
useHexIp: Config.values.useHexIp,
prefetch: Config.values.prefetch,
fileUploadMaxFileSize: Uploader ? Uploader.getMaxFileSize() : undefined, // TODO can't be undefined?
networks: Config.networks
};

const defaultsOverride = {
Expand Down
10 changes: 10 additions & 0 deletions shared/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ export type ConfigTheme = {
name: string;
themeColor: string | null;
};

type NetworkTemplate = {
host: string,
port: number,
tls: boolean,
rejectUnauthorized: boolean // if TLS certificates are validated
};

type SharedConfigurationBase = {
public: boolean;
useHexIp: boolean;
Expand All @@ -16,6 +24,7 @@ type SharedConfigurationBase = {
themes: ConfigTheme[];
defaultTheme: string;
fileUploadMaxFileSize?: number;
networks: {[name: string]: NetworkTemplate};
};

export type ConfigNetDefaults = {
Expand All @@ -34,6 +43,7 @@ export type ConfigNetDefaults = {
saslAccount: string;
saslPassword: string;
};

export type LockedConfigNetDefaults = Pick<
ConfigNetDefaults,
"name" | "nick" | "username" | "password" | "realname" | "join"
Expand Down

0 comments on commit fa60ba2

Please sign in to comment.