I'm confused by the documentation on how to stop listening for channel events in JS using the Stream Chat API. As per the docs:
// remove the handler for all "message.new" events on the channel
channel.off("message.new", myChannelEventHandler);
What is myChannelEventHandler?
My channel.on looks like this, from the example Angular application:
this.channel.on('message.new', event => {
this.messages = [...this.messages, event.message];
});
This is the only time myChannelEventHandler ever referenced in the docs, any guidance would be appreciated.