We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adeb0e7 commit 952612aCopy full SHA for 952612a
src/components/Channel/Channel.tsx
@@ -382,7 +382,9 @@ const ChannelInner = (
382
);
383
} else {
384
const markReadResponse = await channel.markRead();
385
- if (updateChannelUiUnreadState && markReadResponse) {
+ // markReadResponse.event can be null in case of a user that is not a member of a channel being marked read
386
+ // in that case event is null and we should not set unread UI
387
+ if (updateChannelUiUnreadState && markReadResponse?.event) {
388
_setChannelUnreadUiState({
389
last_read: lastRead.current,
390
last_read_message_id: markReadResponse.event.last_read_message_id,
0 commit comments