diff --git a/src/helpers/AccountHelper.ts b/src/helpers/AccountHelper.ts index 029b08d..d704839 100644 --- a/src/helpers/AccountHelper.ts +++ b/src/helpers/AccountHelper.ts @@ -20,6 +20,7 @@ import { AccountImageHelper } from "./AccountImageHelper"; import { BackgroundImageHelper } from "./BackgroundImageHelper"; import { EventsHelper } from "./EventsHelper"; import { CustomEmojisHelper } from "./CustomEmojisHelper"; +import { UserWebSocketController } from "../controllers/UserWebSocketController"; /** * Account helper @@ -485,6 +486,9 @@ export class AccountHelper { */ public static async Delete(userID: number) { + // Close all websockets of user + await UserWebSocketController.CloseAllUserSockets(userID); + // Delete all groups memberships await GroupsHelper.DeleteAllUsersGroups(userID);