From 9ef1442e072b815da92ce990e7d8ec8b9ada8089 Mon Sep 17 00:00:00 2001 From: Sayan4444 <112304873+Sayan4444@users.noreply.github.com> Date: Tue, 2 Jan 2024 19:53:44 +0530 Subject: [PATCH 1/2] fix: No error message when uploading a file that is not allowed (#31346) Co-authored-by: Hugo Costa <20212776+hugocostadev@users.noreply.github.com> --- .changeset/lemon-shrimps-draw.md | 5 +++++ apps/meteor/client/lib/chats/flows/uploadFiles.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lemon-shrimps-draw.md diff --git a/.changeset/lemon-shrimps-draw.md b/.changeset/lemon-shrimps-draw.md new file mode 100644 index 0000000000000..75c2031fbaee3 --- /dev/null +++ b/.changeset/lemon-shrimps-draw.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed error message when uploading a file that is not allowed diff --git a/apps/meteor/client/lib/chats/flows/uploadFiles.ts b/apps/meteor/client/lib/chats/flows/uploadFiles.ts index 1411ad5a004ed..82572aa2dbf5c 100644 --- a/apps/meteor/client/lib/chats/flows/uploadFiles.ts +++ b/apps/meteor/client/lib/chats/flows/uploadFiles.ts @@ -46,7 +46,7 @@ export const uploadFiles = async (chat: ChatAPI, files: readonly File[], resetFi imperativeModal.close(); uploadNextFile(); }, - invalidContentType: Boolean(file.type && !fileUploadIsValidContentType(file.type)), + invalidContentType: !(file.type && fileUploadIsValidContentType(file.type)), }, }); }; From c2e7116a6b522c245e60b3e323fe1fb9ee2f6ee1 Mon Sep 17 00:00:00 2001 From: Sayan4444 <112304873+Sayan4444@users.noreply.github.com> Date: Tue, 2 Jan 2024 21:19:25 +0530 Subject: [PATCH 2/2] fix: close image gallery on backdrop click (#31344) --- .../client/components/ImageGallery/ImageGallery.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/meteor/client/components/ImageGallery/ImageGallery.tsx b/apps/meteor/client/components/ImageGallery/ImageGallery.tsx index 0675532432aa8..ebce7d42e5416 100644 --- a/apps/meteor/client/components/ImageGallery/ImageGallery.tsx +++ b/apps/meteor/client/components/ImageGallery/ImageGallery.tsx @@ -109,10 +109,10 @@ const ImageGallery = () => { return createPortal( -
+
- - + e.stopPropagation()} /> + e.stopPropagation()} /> { {images?.map(({ _id, url }) => (
- + e.stopPropagation()} />