Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/Channel/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ const ChannelInner = (
);
} else {
const markReadResponse = await channel.markRead();
if (updateChannelUiUnreadState && markReadResponse) {
// markReadResponse.event can be null in case of a user that is not a member of a channel being marked read
// in that case event is null and we should not set unread UI
if (updateChannelUiUnreadState && markReadResponse?.event) {
_setChannelUnreadUiState({
last_read: lastRead.current,
last_read_message_id: markReadResponse.event.last_read_message_id,
Expand Down