diff --git a/src/api/util/handlers/Instance.ts b/src/api/util/handlers/Instance.ts index ccd56d92..e7b14c4f 100644 --- a/src/api/util/handlers/Instance.ts +++ b/src/api/util/handlers/Instance.ts @@ -34,5 +34,5 @@ export async function initInstance() { // } // TODO: do no clear sessions for instance cluster - await Session.delete({}); + await Session.clear(); } diff --git a/src/gateway/util/Utils.ts b/src/gateway/util/Utils.ts index dac1c805..54cfaf3d 100644 --- a/src/gateway/util/Utils.ts +++ b/src/gateway/util/Utils.ts @@ -49,15 +49,18 @@ export function generateStreamKey( // TODO: remove this when Server.stop() is fixed so that it waits for all websocket connections to run their // respective Close event listener function for session cleanup export async function cleanupOnStartup(): Promise { - await VoiceState.update( - {}, - { - // @ts-expect-error channel_id is nullable - channel_id: null, - // @ts-expect-error guild_id is nullable - guild_id: null, - self_stream: false, - self_video: false, - }, - ); + // TODO: how is this different from clearing the table? + //await VoiceState.update( + // {}, + // { + // // @ts-expect-error channel_id is nullable + // channel_id: null, + // // @ts-expect-error guild_id is nullable + // guild_id: null, + // self_stream: false, + // self_video: false, + // }, + //); + + await VoiceState.clear(); }