Spaces:
Sleeping
Sleeping
| import { z } from "zod"; | |
| import { Context } from "../hapticLinkServer"; | |
| export interface GetUserInfoPayload { } | |
| export const GetUserInfoSchema = z.object({ }); | |
| export function GetUserInfoHandler(ctx: Context<GetUserInfoPayload>) { | |
| return ctx.ws.send( | |
| JSON.stringify({ | |
| message: "get_user_info_response", | |
| status: "success", | |
| user: { | |
| id: ctx.user.id, | |
| username: ctx.user.username, | |
| currentRoom: ctx.user.currentRoom, | |
| }, | |
| }) | |
| ); | |
| } | |