Skip to content

Commit 59647d3

Browse files
authored
fix: Remove a logic blocking adding an empty channel to the ChannelList (#822)
[CLNP-1196](https://sendbird.atlassian.net/browse/CLNP-1196) ### Issue We have blocked adding a new empty channel to the ChannelList. But it's not considered with the ChannelListQuery, and there was a use case that needed to add super group channels to the ChannelList. It's fine to remove this logic because ChannelListQuery filters the empty channels by referring to its `includeEmpty` options. ### Fix * Remove the logic blocking adding an empty channel to the ChannelList because the ChannelListQuery should judge it
1 parent bcfe78c commit 59647d3

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/modules/ChannelList/dux/reducers.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ export default function channelListReducer(
140140
const { allChannels = [], currentUserId, currentChannel, channelListQuery, disableAutoSelect } = state;
141141
const { unreadMessageCount } = channel;
142142

143-
// Do not display the channel when it's created (and not sent a message yet)
144-
if (action.type === channelListActions.ON_USER_JOINED && !channel?.lastMessage) return state;
145-
146143
if (channelListQuery) {
147144
if (filterChannelListParams(channelListQuery, channel, currentUserId)) {
148145
// Good to [add to/keep in] the ChannelList

0 commit comments

Comments
 (0)