summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2025-07-02 17:36:46 +0200
committerRory& <root@rory.gay>2025-07-06 09:18:22 +0200
commit3e549dae28fc89d93a657be6498fb2900d079fad (patch)
tree971d8f95444579b2cff2a4030b65da4c73fb29ab /src
parentUpdate some dependencies, fix nix (diff)
downloadserver-ts-3e549dae28fc89d93a657be6498fb2900d079fad.tar.xz
Fix typeorm queries no longer allowing empty where clauses
Diffstat (limited to 'src')
-rw-r--r--src/api/util/handlers/Instance.ts2
-rw-r--r--src/gateway/util/Utils.ts25
2 files changed, 15 insertions, 12 deletions
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<void> { - 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(); }