Skip to content

Commit 8ba5e06

Browse files
authored
fix: use global config's replyType if channel one is undefined (#638)
Resolves https://sendbird.atlassian.net/browse/UIKIT-4138 Put a fallback value to replyType in ChannelContext so the global config can be used.
1 parent 4204a35 commit 8ba5e06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/Channel/context/ChannelProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ const ChannelProvider: React.FC<ChannelContextProps> = (props: ChannelContextPro
177177
onChatHeaderActionClick,
178178
onSearchClick,
179179
onBackClick,
180-
replyType,
180+
replyType: channelReplyType,
181181
threadReplySelectType,
182182
queries,
183183
filterMessageList,
@@ -190,6 +190,7 @@ const ChannelProvider: React.FC<ChannelContextProps> = (props: ChannelContextPro
190190

191191
const globalStore = useSendbirdStateContext();
192192
const { config } = globalStore;
193+
const replyType = channelReplyType ?? config.replyType;
193194
const {
194195
pubSub,
195196
logger,

0 commit comments

Comments
 (0)