Skip to content
Merged
Changes from 3 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
10 changes: 7 additions & 3 deletions package/src/components/Channel/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,12 @@ const ChannelWithContext = <
const handleEvent: EventHandler<StreamChatGenerics> = (event) => {
if (shouldSyncChannel) {
// Ignore user.watching.start and user.watching.stop events
const ignorableEvents = ['user.watching.start', 'user.watching.stop'];
if (ignorableEvents.includes(event.type) || event.type.startsWith('poll.')) return;
if (
event.type.startsWith('poll.') ||
event.type === 'user.watching.start' ||
event.type === 'user.watching.stop'
)
return;

// If the event is typing.start or typing.stop, set the typing state
const isTypingEvent = event.type === 'typing.start' || event.type === 'typing.stop';
Expand Down Expand Up @@ -871,7 +875,7 @@ const ChannelWithContext = <
listener?.unsubscribe();
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [channelId, messageId, shouldSyncChannel]);
}, [channel.cid, messageId, shouldSyncChannel]);

// subscribe to channel.deleted event
useEffect(() => {
Expand Down
Loading