New Features 🎉
-
Added inline date separators, which can be customized by adding your own UI component #581
<Channel InlineDateSeparator={({ date }) => { /** Your custom UI */ }} maxTimeBetweenGroupedMessages={40000} // number of ms, after which further messages will be considered part of new group. >
-
Added ability to override default onLongPress, onPress, onPressIn and onDoubleTap handlers using following props on Channel component:
- onLongPressMessage
- onPressMessage
- onPressInMessage
- onDoubleTapMessage
You will have access to payload of that handler as param:
<Channel ... onLongPressMessage={({ actionHandlers: { deleteMessage, // () => Promise<void>; editMessage, // () => void; reply, // () => void; resendMessage, // () => Promise<void>; showMessageOverlay, // () => void; toggleBanUser, // () => Promise<void>; toggleMuteUser, // () => Promise<void>; toggleReaction, // (reactionType: string) => Promise<void>; }, defaultHandler, // () => void event, // any event object corresponding to touchable feedback emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc message // message object on which longPress occured }) => { /** Your custom action */ }} />
🛑 BREAKING
-
Following props are no longer accessible on
Inputcomponent (which is used to customize underlying input box). They should be accessed fromMessageInputContext(or corresponding hook -useMessageInputContext)- openAttachmentPicker
- closeAttachmentPicker
- toggleAttachmentPicker
- openCommandsPicker
- openMentionsPicker
- openFilePicker
-
Value
typing(which is list of users who are typing), has been moved fromChannelContextto its own separate context -TypingContextc450719