roomListRequestHandler.ts
475 Bytes
import { Connection } from "../../connection/Connection";
import { RoomManager } from "../../room/RoomManager";
import { RoomDescription, RoomInfo } from "../../room/types";
import { User } from "../../user/User";
import { MessageResponse, RoomListRequestMessage } from "../types";
export function roomListRequestHandler(
user: User,
message: RoomListRequestMessage
): MessageResponse<RoomDescription[]> {
return { ok: true, result: RoomManager.instance().list() };
}