From 7bca81df44ad4307ac4a98f80076c5d7715ee258 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Wed, 19 Jan 2022 17:10:36 -0800 Subject: [PATCH] auto join the room --- components/Modals/CreateOrUpdateRoom.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/Modals/CreateOrUpdateRoom.tsx b/components/Modals/CreateOrUpdateRoom.tsx index 4626f28..7a1ceee 100644 --- a/components/Modals/CreateOrUpdateRoom.tsx +++ b/components/Modals/CreateOrUpdateRoom.tsx @@ -98,6 +98,12 @@ export default function CreateOrUpdateRoomModal(props: IModalProps) { // make sure approximate time isn't selected newRoom.approximateDateTime = null; newRoom.status = RoomStatus.live; + + // automatically add me to the room + newRoom.membersInRoom = [currUser.uid]; + + // navigate to the new room automatically + window.open(roomLink, "_blank"); } else if (roomType == RoomType.scheduled) { // make sure that either appx or time picker is selected, not both if (!dateTimePicker) {