From 8aa1ac2d344decaab568e6f8c525f30e35d4af2b Mon Sep 17 00:00:00 2001 From: Zishan Ahmad Date: Mon, 22 Jan 2024 23:59:35 +0530 Subject: [PATCH] fix: Can't remove channel's password to join (#31507) Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com> --- .changeset/forty-dragons-juggle.md | 5 +++++ .../room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/forty-dragons-juggle.md diff --git a/.changeset/forty-dragons-juggle.md b/.changeset/forty-dragons-juggle.md new file mode 100644 index 000000000000..8abdfc63a7eb --- /dev/null +++ b/.changeset/forty-dragons-juggle.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed an issue not allowing users to remove the password to join the room on room edit diff --git a/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx b/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx index 2e41ec2904a8..09268dc6a43a 100644 --- a/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx +++ b/apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx @@ -106,7 +106,7 @@ const EditRoomInfo = ({ room, onClickClose, onClickBack }: EditRoomInfoProps) => await saveAction({ rid: room._id, ...data, - ...(data.joinCode && { joinCode: joinCodeRequired ? data.joinCode : '' }), + ...((data.joinCode || 'joinCodeRequired' in data) && { joinCode: joinCodeRequired ? data.joinCode : '' }), ...((data.systemMessages || !hideSysMes) && { systemMessages: hideSysMes && data.systemMessages, }),