summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-17 00:41:21 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-17 00:41:21 +0200
commit38106d9cbb6279d0bdfd9f16ff5cc9a609a84479 (patch)
treec54abd14f450c3b01193fa639138b0e6241a122e
parent:bug: user settings (diff)
downloadserver-38106d9cbb6279d0bdfd9f16ff5cc9a609a84479.tar.xz
:art: clean up instances on start
-rw-r--r--api/src/util/Instance.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/src/util/Instance.ts b/api/src/util/Instance.ts
index 7dcd126e..6bddfa98 100644
--- a/api/src/util/Instance.ts
+++ b/api/src/util/Instance.ts
@@ -1,4 +1,4 @@
-import { Config, Guild } from "@fosscord/util";
+import { Config, Guild, Session } from "@fosscord/util";
 
 export async function initInstance() {
 	// TODO: clean up database and delete tombstone data
@@ -15,4 +15,7 @@ export async function initInstance() {
 			await Config.set({ guild: { autoJoin: { guilds: [guild.id] } } });
 		}
 	}
+
+	// TODO: do no clear sessions for instance cluster
+	await Session.delete({});
 }