From b9b8e07481f62453d683fb27116ed3918a16785c Mon Sep 17 00:00:00 2001
From: Will Hunt <will@half-shot.uk>
Date: Sun, 27 Jan 2019 16:53:13 +0000
Subject: [PATCH] I broke loads of tools

---
 tools/addRoomsToDirectory.ts | 2 +-
 tools/chanfix.ts             | 5 ++++-
 tools/ghostfix.ts            | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/addRoomsToDirectory.ts b/tools/addRoomsToDirectory.ts
index f4f4b9f..d127226 100644
--- a/tools/addRoomsToDirectory.ts
+++ b/tools/addRoomsToDirectory.ts
@@ -98,7 +98,7 @@ async function run() {
     } catch (e) {
         log.error(`Failed to load database`, e);
     }
-
+    // This will be broken.
     let rooms = await bridge.getRoomStore().getEntriesByRemoteRoomData({
         discord_type: "text",
     });
diff --git a/tools/chanfix.ts b/tools/chanfix.ts
index d06b4b9..1fdc910 100644
--- a/tools/chanfix.ts
+++ b/tools/chanfix.ts
@@ -101,7 +101,8 @@ const bridge = new Bridge({
     userStore: config.database.userStorePath,
 });
 
-provisioner.SetBridge(bridge);
+// Broken
+//provisioner.setStore(null);
 discordbot.setBridge(bridge);
 
 async function run() {
@@ -117,6 +118,7 @@ async function run() {
     const client = await discordbot.ClientFactory.getClient();
 
     // first set update_icon to true if needed
+    // This will be broken
     const mxRoomEntries = await bridge.getRoomStore().getEntriesByRemoteRoomData({
         update_name: true,
         update_topic: true,
@@ -132,6 +134,7 @@ async function run() {
             return; // skipping because something was set manually
         }
         entry.remote.set("update_icon", true);
+        // This will be broken
         promiseList.push(bridge.getRoomStore().upsertEntry(entry));
     });
     await Promise.all(promiseList);
diff --git a/tools/ghostfix.ts b/tools/ghostfix.ts
index 091ae37..b634282 100644
--- a/tools/ghostfix.ts
+++ b/tools/ghostfix.ts
@@ -114,7 +114,8 @@ const bridge = new Bridge({
     userStore: config.database.userStorePath,
 });
 
-provisioner.SetBridge(bridge);
+// This will not work.
+//provisioner.SetBridge(bridge);
 discordbot.setBridge(bridge);
 
 async function run() {
-- 
GitLab