From a3184aa43aa82fe1b733622f7d112fd91c641e91 Mon Sep 17 00:00:00 2001 From: bertybuttface <110790513+bertybuttface@users.noreply.github.com> Date: Mon, 6 Feb 2023 13:42:17 +0000 Subject: [PATCH] Respect disabled MATRIX_ENCRYPTION --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3922445..176c2dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,7 +36,7 @@ if (KEYV_BOT_STORAGE) { storage = new SimpleFsStorageProvider(path.join(DATA_PATH, "bot.json")); // /storage/bot.json } -const cryptoStore: ICryptoStorageProvider = new RustSdkCryptoStorageProvider(path.join(DATA_PATH, "encrypted")); // /storage/encrypted +const cryptoStore = MATRIX_ENCRYPTION ? new RustSdkCryptoStorageProvider(path.join(DATA_PATH, "encrypted")) : undefined; // /storage/encrypted async function main() { if (!MATRIX_ACCESS_TOKEN){ @@ -71,7 +71,7 @@ async function main() { LogService.info("index", `Bot joined room ${roomId}`); await client.sendMessage(roomId, { "msgtype": "m.notice", - "body": `👋 Hello, I'm the ChatGPT bot! Encrypted message support: ${MATRIX_ENCRYPTION}`, + "body": `👋 Hello, I'm ChatGPT bot! Matrix E2EE: ${MATRIX_ENCRYPTION}`, }); }); @@ -79,7 +79,7 @@ async function main() { const commands = new CommandHandler(client, chatGPT); await commands.start(); - LogService.info("index", `Starting bot using ChatGPT model ${CHATGPT_MODEL}`); + LogService.info("index", `Starting bot using ChatGPT model: ${CHATGPT_MODEL}`); await client.start() LogService.info("index", "Bot started!"); }