From 917e4a47b9150d172f06dcfe9e55626e87661729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mai=20G=C3=A1bor?= Date: Tue, 7 Nov 2023 21:25:42 +0100 Subject: [PATCH] make rooms lowercase --- src/services/rooms/rooms.schema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/rooms/rooms.schema.ts b/src/services/rooms/rooms.schema.ts index aa4d29d..a921714 100644 --- a/src/services/rooms/rooms.schema.ts +++ b/src/services/rooms/rooms.schema.ts @@ -154,6 +154,8 @@ export const roomDataSchema = Type.Intersect([ export type RoomData = Static export const roomDataValidator = getValidator(roomDataSchema, dataValidator); export const roomDataResolver = resolve({ + // on room-server rooms are case insensitive + name: async (value, room, context) => context.data.name.toLowerCase(), createdAt: async () => Date.now(), updatedAt: async () => Date.now(), creatorId: async (value, room, context) => context.params.user?.id,