When receiving channel information from channel events, the filters are not respected; the reason for this is that channel filters can get very complex, and implementing that filtering logic that supports all of the custom filter would be very hard to do. Implementing this on the backend side isn’t an option as it is inefficient and has to cater to different filters. So, to help you with it, you will have to override the notification.message_new event using the onNewMessageNotification and message.new event handlers using the onNewMessage prop of the ChannelList component.
Filter object passed internally to the client query function as a parameter. You can filter a query on built-in and custom fields on a Channel.
For optimal performance you should pass a filter object with a static reference. You can use a filter object that is not created inline; or memoize an inline filter object before passing it to the ChannelList to achieve this.
Sort object passed internally to the client query function as a parameter. You can sort a query on built-in and custom fields on a Channel.
For optimal performance you should pass a sort object with a static reference. You can use a sort object that is not created inline; or memoize an inline sort object before passing it to the ChannelList to achieve this.
Function called when a user presses an item in the ChannelList. The function is called with the Channel instance corresponding to the list item as the only parameter. This callback is often used for navigating to a channel screen.
A Channel instance is not serializable and will therefore raise warnings if passed as a parameter through navigation to another screen.
Sets the onEndReachedThreshold of the underlying FlatList. We recommend using 0.1 as the default value for this prop, as changing it might hit additional channelQuery calls, and you might reach the limit.
Override for the default Event Listener behavior when a channel member is updated i.e., member.updated event is received. This is essential for channel pinning and archiving to work.
Type
Function
Parameter
Description
lockChannelOrder
Locks the order of the channels in the list so they will not dynamically reorder by most recent message when a new message is received.
Override for the default Event Listener behavior when a channel is updated. The default behavior updates the data on a channel with that from the event.
Override for the default Event Listener behavior when a message is received on a channel that is not being watched. The default behavior adds the channel to the list.
Override for the default Event Listener behavior when a message is received on a channel that is being watched. The default behavior moves the channel to the top of the list.
Type
Function
Parameter
Description
lockChannelOrder
Locks the order of the channels in the list so they will not dynamically reorder by most recent message when a new message is received.