From b395046d145c082373e3066f38ecdb5ead997b0c Mon Sep 17 00:00:00 2001 From: Half-Shot <will@half-shot.uk> Date: Fri, 23 Aug 2019 10:30:57 +0100 Subject: [PATCH] Throw an error if legacy datastores are still defined --- src/discordas.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/discordas.ts b/src/discordas.ts index acd59b5..f1bc1d7 100644 --- a/src/discordas.ts +++ b/src/discordas.ts @@ -135,6 +135,12 @@ async function run() { } config.applyConfig(yaml.safeLoad(fs.readFileSync(configPath, "utf8"))); Log.Configure(config.logging); + if (config.database.roomStorePath || config.database.userStorePath) { + log.error("The keys 'roomStorePath' and/or 'userStorePath' is still defined in the config. " + + "Please see docs/bridge-migrations.md on " + + "https://github.com/Half-Shot/matrix-appservice-discord/"); + throw Error("Bridge has legacy configuration options and is unable to start"); + } const registration = yaml.safeLoad(fs.readFileSync(registrationPath, "utf8")) as IAppserviceRegistration; setupLogging(); const appservice = new Appservice({ -- GitLab