roomLeaveHandler.ts 311 Bytes
import { Connection } from "../../connection/Connection";
import { RoomManager } from "../../room/RoomManager";
import { User } from "../../user/User";
import { RoomLeaveMessage } from "../types";

export function roomLeaveHandler(user: User, message: RoomLeaveMessage): void {
  user.room?.disconnect(user);
}