From fe08bd75ea1d7d3041b86b1e8519f2f04b9c19bc Mon Sep 17 00:00:00 2001
From: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com>
Date: Tue, 5 Nov 2024 18:32:21 +0100
Subject: [PATCH 1/4] fix: message disallowed indicator display (#2754)
---
package/src/components/MessageInput/MessageInput.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/src/components/MessageInput/MessageInput.tsx b/package/src/components/MessageInput/MessageInput.tsx
index f4140b0ca..57c642a4b 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 ;
}
From b9c49be85b8d7927dc64f55d7e9ba01b11737016 Mon Sep 17 00:00:00 2001
From: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com>
Date: Thu, 7 Nov 2024 15:53:35 +0100
Subject: [PATCH 2/4] fix: native image picker poll control (#2762)
---
.../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({
From ff5339982914051b6e8f941a4799fc772ce409aa Mon Sep 17 00:00:00 2001
From: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com>
Date: Thu, 7 Nov 2024 15:55:32 +0100
Subject: [PATCH 3/4] fix: check for channel validity before consuming config
(#2760)
---
.../components/ChannelPreview/hooks/useLatestMessagePreview.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts b/package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts
index da5899942..a1ef491b7 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);
}
From 5258a18468fe9716918ec9e663ae5e0861b17df5 Mon Sep 17 00:00:00 2001
From: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com>
Date: Thu, 7 Nov 2024 16:34:05 +0100
Subject: [PATCH 4/4] fix: receiverMessageBackgroundColor hotfix (#2763)
* fix: receiverMessageBackgroundColor hotfix
* fix: tests
---
.../Thread/__tests__/__snapshots__/Thread.test.js.snap | 8 ++++----
package/src/contexts/themeContext/utils/theme.ts | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
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 1e51ebe77..5f63002d1 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 acb6579e9..0784cfa11 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,