From 7ac8534118e7b141df284a1be89862c3582f0247 Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj Date: Thu, 7 Nov 2024 15:29:57 +0100 Subject: [PATCH] fix: native image picker poll control --- .../MessageInput/components/NativeAttachmentPicker.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/src/components/MessageInput/components/NativeAttachmentPicker.tsx b/package/src/components/MessageInput/components/NativeAttachmentPicker.tsx index 4e989d29b..ee79f0713 100644 --- a/package/src/components/MessageInput/components/NativeAttachmentPicker.tsx +++ b/package/src/components/MessageInput/components/NativeAttachmentPicker.tsx @@ -120,9 +120,8 @@ export const NativeAttachmentPicker = ({ // do not allow poll creation in threads const buttons = - threadList && hasCreatePoll && ownCapabilities.sendPoll - ? [] - : [ + !threadList && hasCreatePoll && ownCapabilities.sendPoll + ? [ { icon: , id: 'Poll', @@ -130,7 +129,8 @@ export const NativeAttachmentPicker = ({ openPollCreationDialog?.({ sendMessage }); }, }, - ]; + ] + : []; if (hasImagePicker) { buttons.push({