Skip to content

Commit d0759b7

Browse files
committed
chore: restructure ignored events
1 parent 8202bc1 commit d0759b7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,12 @@ const ChannelWithContext = <
767767
const handleEvent: EventHandler<StreamChatGenerics> = (event) => {
768768
if (shouldSyncChannel) {
769769
// Ignore user.watching.start and user.watching.stop events
770-
const ignorableEvents = ['user.watching.start', 'user.watching.stop'];
771-
if (ignorableEvents.includes(event.type) || event.type.startsWith('poll.')) return;
770+
if (
771+
event.type.startsWith('poll.') ||
772+
event.type === 'user.watching.start' ||
773+
event.type === 'user.watching.stop'
774+
)
775+
return;
772776

773777
// If the event is typing.start or typing.stop, set the typing state
774778
const isTypingEvent = event.type === 'typing.start' || event.type === 'typing.stop';

0 commit comments

Comments
 (0)