diff --git a/package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts b/package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts index da58999427..a1ef491b79 100644 --- a/package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +++ b/package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts @@ -298,7 +298,8 @@ export const useLatestMessagePreview = < useEffect(() => { if (channelConfigExists) { - const read_events = channel.getConfig()?.read_events; + const read_events = + !channel.disconnected && !!channel?.id && channel.getConfig()?.read_events; if (typeof read_events === 'boolean') { setReadEvents(read_events); } diff --git a/package/src/components/MessageInput/MessageInput.tsx b/package/src/components/MessageInput/MessageInput.tsx index f4140b0cab..57c642a4bb 100644 --- a/package/src/components/MessageInput/MessageInput.tsx +++ b/package/src/components/MessageInput/MessageInput.tsx @@ -1165,7 +1165,7 @@ export const MessageInput = < * Disable the message input if the channel is frozen, or the user doesn't have the capability to send a message. * Enable it in frozen mode, if it the input has editing state. */ - if (!editing && disabled && !ownCapabilities.sendMessage && SendMessageDisallowedIndicator) { + if ((disabled || !ownCapabilities.sendMessage) && !editing && SendMessageDisallowedIndicator) { return ; } diff --git a/package/src/components/MessageInput/components/NativeAttachmentPicker.tsx b/package/src/components/MessageInput/components/NativeAttachmentPicker.tsx index 4e989d29b8..ee79f0713c 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({ diff --git a/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap b/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap index 1e51ebe776..5f63002d17 100644 --- a/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +++ b/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap @@ -416,7 +416,7 @@ exports[`Thread should match thread snapshot 1`] = ` "overflow": "hidden", }, { - "backgroundColor": "#FFFFFF", + "backgroundColor": "#F2F2F2", "borderBottomLeftRadius": 0, "borderBottomRightRadius": 16, "borderColor": "#ECEBEB", @@ -742,7 +742,7 @@ exports[`Thread should match thread snapshot 1`] = ` "overflow": "hidden", }, { - "backgroundColor": "#FFFFFF", + "backgroundColor": "#F2F2F2", "borderBottomLeftRadius": 0, "borderBottomRightRadius": 16, "borderColor": "#ECEBEB", @@ -1068,7 +1068,7 @@ exports[`Thread should match thread snapshot 1`] = ` "overflow": "hidden", }, { - "backgroundColor": "#FFFFFF", + "backgroundColor": "#F2F2F2", "borderBottomLeftRadius": 0, "borderBottomRightRadius": 16, "borderColor": "#ECEBEB", @@ -1422,7 +1422,7 @@ exports[`Thread should match thread snapshot 1`] = ` "overflow": "hidden", }, { - "backgroundColor": "#FFFFFF", + "backgroundColor": "#F2F2F2", "borderBottomLeftRadius": 0, "borderBottomRightRadius": 16, "borderColor": "#ECEBEB", diff --git a/package/src/contexts/themeContext/utils/theme.ts b/package/src/contexts/themeContext/utils/theme.ts index acb6579e92..0784cfa111 100644 --- a/package/src/contexts/themeContext/utils/theme.ts +++ b/package/src/contexts/themeContext/utils/theme.ts @@ -1218,7 +1218,7 @@ export const defaultTheme: Theme = { metaText: { fontSize: 12, }, - receiverMessageBackgroundColor: Colors.white, + receiverMessageBackgroundColor: Colors.white_smoke, replyBorder: {}, replyContainer: {}, senderMessageBackgroundColor: Colors.grey_gainsboro,