mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-21 21:09:22 +00:00
Close all user WS before deleting account
This commit is contained in:
parent
f8cf4c5c9c
commit
2b02035ee3
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user