mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-05-05 23:35:20 +00:00
Load a default config when a default can't be located
The config package will use default.yaml for us, but most deployments won't have set that up correctly so instead we offer sensible defaults in addition to the thing from config.
This commit is contained in:
+39
-1
@@ -57,4 +57,42 @@ interface IConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export default <IConfig>config;
|
||||
const defaultConfig: IConfig = {
|
||||
homeserverUrl: "http://localhost:8008",
|
||||
accessToken: "NONE_PROVIDED",
|
||||
pantalaimon: {
|
||||
use: false,
|
||||
username: "",
|
||||
password: "",
|
||||
},
|
||||
dataPath: "/data/storage",
|
||||
autojoin: false,
|
||||
autojoinOnlyIfManager: false,
|
||||
managementRoom: "!noop:example.org",
|
||||
verboseLogging: false,
|
||||
logLevel: "INFO",
|
||||
syncOnStartup: true,
|
||||
verifyPermissionsOnStartup: true,
|
||||
noop: false,
|
||||
protectedRooms: [],
|
||||
fasterMembershipChecks: false,
|
||||
automaticallyRedactForReasons: ["spam", "advertising"],
|
||||
protectAllJoinedRooms: false,
|
||||
banListServer: {
|
||||
enabled: false,
|
||||
bind: "0.0.0.0",
|
||||
port: 5186,
|
||||
},
|
||||
commands: {
|
||||
allowNoPrefix: false,
|
||||
additionalPrefixes: [],
|
||||
},
|
||||
|
||||
// Needed to make the interface happy.
|
||||
RUNTIME: {
|
||||
client: null,
|
||||
},
|
||||
};
|
||||
|
||||
const finalConfig = <IConfig>Object.assign({}, defaultConfig, config);
|
||||
export default finalConfig;
|
||||
|
||||
Reference in New Issue
Block a user