roomChatHandler.ts 340 Bytes
import { Connection } from "../../connection/Connection";
import { RoomManager } from "../../room/RoomManager";
import { User } from "../../user/User";
import { RoomChatMessage, RoomJoinMessage } from "../types";

export function roomChatHandler(user: User, message: RoomChatMessage): void {
  user.room?.sendChat(user, message.message);
}