mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04: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:
parent
9e5c87ac56
commit
f7448564be
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user