roomJoinHandler.ts
374 Bytes
import { Connection } from "../../connection/Connection";
import { RoomManager } from "../../room/RoomManager";
import { RoomJoinMessage } from "../types";
export function roomJoinHandler(
connection: Connection,
message: RoomJoinMessage
): void {
const room = RoomManager.instance().get(message.uuid);
if (room !== undefined) {
room.connect(connection);
}
}