Releases: GetStream/stream-chat-react-native
[3.6.0-rc.0] (2021-05-02)
This release provides full support for Expo 41 and React Native 0.64
Please make sure to upgrade following packages to specified versions:
[3.5.0] (2021-05-28)
π BREAKING
Following props have been renamed:
reply->quotedReplyhandleReply->handleQuotedReplyhandleReplyMessage->handleQuotedReplyMessage
Features
-
Added new props to Channel component 219b307
- maxMessageLength (number)
- reactionsEnabled (boolean)
- readEventsEnabled (boolean)
- repliesEnabled (boolean)
- typingEventsEnabled (boolean)
- uploadsEnabled (boolean)
- quoteRepliesEnabled (boolean)
- threadRepliesEnabled (boolean)
Bug fixes
[3.4.0] (2021-05-14)
Features
- Updated implementation around network recovery for smooth UX #658
- Added support for
MessageDeletedprop on Channel component, for overriding default deleted message component 65861d9 - Refresh channel list when
sortprop updates, on ChannelList 42450fa - Added support for typing indicator in threads 6f518ca
- Added handler for
channel.visibleevent 476c36e
Bug fixes
[3.3.2] (2021-04-13)
[3.3.1] (2021-04-09)
- Fixed
supportedReactionsprop support onOverlayReactions#594 - Fixed mentions autocomplete functionality for channels with > 100 members e8c93d3
- Fixed theming issue on overlay for sent message (or my message) 7f11364
- Exporting following components and hooks from SDK 3a3ae58
- ChannelListLoadingIndicator
- ChannelPreviewMessage
- ChannelPreviewStatus
- ChannelPreviewTitle
- ChannelPreviewUnreadCount
- InputButtons
- useAppStateListener
[3.3.0] (2021-04-07)
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
Fixes
[3.2.0] (2021-03-23)
π BREAKING
- Minimum required
stream-chatversion is3.5.1. - Following values have been moved from
MessagesContexta separate context -PaginatedMessageListContext- hasMore
- messages
- loadMore
- loadMoreRecent
- loadMoreThread
- loadingMore
- loadingMoreRecent
Non breaking:
Websocket and Push
From this release when app goes to background, websocket connection will be dropped by default.
This is necessary to allow push notifications.
We only send push notification, when user doesn't have any active websocket connection (which is established when you call client.connectUser). When your app goes to background, your device will keep the ws connection alive for around 15-20 seconds, and so within this period you won't receive any push notification. Until now, it was upto end user to drop the connection by explicitly calling client.closeConnection() or client.wsConnection.disconnect(), when app goes to background.
But from this release, we have moved this functionality to OOTB.
- If you don't have push system configured for your application, you can disable this functionality by adding a prop on Chat component -
closeConnectionOnBackground={false} - As described earlier, please make sure you are on
stream-chat >= 3.5.1
Other
- Allow use of Channel component with uninitialized channel
- Allow custom config of i18next config
- UI fixes and animation improvements for reactions
[3.1.2] (2021-02-17)
NO CODE CHANGE
Fixed versioning in version.json during package publishing, which we use to track the version of RN sdk through
client.setUserAgent call.
[3.1.1] (2021-02-17)
Fixed type definition pointers in package.json
[3.1.0] (2021-03-15)
-
π BREAKING: Removed a prop
handleOnPressonInputcomponent. -
Added support for new props on
Inputcomponent, which can be used on Channel component as prop to replace undelying input component (reference)- closeAttachmentPicker (function)
- openAttachmentPicker (function)
- openCommandsPicker (function)
- toggleAttachmentPicker (function)
-
Added support for new prop on
Channelcomponent -InputButtons, to replace the extra buttons on the left on input box #536 -
Added support for
messageActionsprop as callback. Also added support for propmessageActionson Channel component #548
Earlier you could override messageActions prop as following:<Channel messageActions=[ { action: () => { /** Some message action logic */ }; title: "Pin Message"; icon: PinIcon; titleStyle: {}; }, { action: () => { /** Some message action logic */ }; title: "Delete Message"; icon: PinIcon; titleStyle: {}; } ] > {/** MessageList and MessageInput component here */} </Channel>
But now, you can selectly keep certain action and remove some:
/** Lets say you only want to keep threadReply and copyMessage actions */ <Channel messageActions={({ blockUser, copyMessage, deleteMessage, editMessage, flagMessage, muteUser, reply, retry, threadReply, }) => ([ threadReply, copyMessage ])} > {/** MessageList and MessageInput component here */} </Channel>
-
Issue fix: make OverlayReactions customizable through props. c7a83b8
-
Issue fix: Image upload for expo and assets-library 5a2d0e8
-
Issue fix: Compatibility with jest as described in #508 a172c15