Releases: sendbird/sendbird-chat-sdk-javascript
v4.7.0
v4.7.0 (Apr 17, 2023)
Features
(Moderation) Automatically detect when user is unmuted
You can now automatically detect when a muted user is unmuted by leveraging MessageCollections.
Clients will now receive MessageCollectionHandler.onChannelUpdated() with GroupChannelContext.GroupChannelEventSource.EVENT_CHANNEL_UNMUTED when an user is unmuted after their muted duration has expired, on top of explict unmute calls. This now means that you can easily transition user’s experience and allow them to chat even more seamlessly.
Note that this is a MessageCollections only feature! We recommend all of our clients to give it a try if you haven’t
Improvements
- Fixed a bug when broken
disconnect()before cache initialization - Fixed a bug where
LOGIerror command processing - Added
collection.close()whendisconnect()is called - Added support for
AbortControllercompatibility - Improved stability
v4.6.2
Improvements
- Fixed a bug where
GroupChannelCollectioncould not handleEVENT_MESSAGE_SENT
v4.6.1
Improvements
- Added
fetchpolyfill withAbortControllersupport - Fixed a bug where messages in
MessageCollectionnot carryingparentMessagevalue when they should - Improved stability
v4.6.0
v4.6.0 (Mar 16, 2023)
Features
Set your own Local Caching DB size
You can now control the size of your local cache. Starting from 64mb, decide how much you want to store (Default: 256mb).
Once the size limit is reached, the SDK will automatically remove messages and channels with pre-specified logic (clearOrder) so that you don't have to actively manage it.
- Added DB size related properties in
LocalCacheConfig
const localCacheConfig: LocalCacheConfig = new LocalCacheConfig({
maxSize: 256,
clearOrder: CachedDataClearOrder.MESSAGE_COLLECTION_ACCESSED_AT,
});Improvements
- Added
SendbirdErrorCode.DATABASE_ERROR - Added
getCachedDataSize()in SendBirdChat - Added
OpenChannelCreateParams.isEphemeral - Fixed a bug where SDK reconnects internally in disconnected state after
disconnectWebsocket()is called - Fixed a bug to use
MemoryStorewhen SDK is running in a browser that does not supportindexedDB - Improvement stability
v4.5.0
v4.5.0 (Mar 3, 2023)
Features
Polls in Open Channel
Polls is now supported in both Open Channels and Group Channels!
Specification
- Added
Poll.serialize() - Added
PollModule.buildPollFromSerializedData() - Added
onPollUpdated,onPollVoted, andonPollDeletedinOpenChannelHandlerParams - Moved following methods from
GroupChanneltoBaseChannel:updatePoll()deletePoll()closePoll()addPollOption()updatePollOption()deletePollOption()votePoll()getPollChangeLogsSinceTimestamp()getPollChangeLogsSinceToken()createPollListQuery()createPollVoterListQuery()
Improvements
- Fixed a bug where
GroupChannelFilterusing nicknames (nicknameContainsFilter,nicknameExactMatchFilter, andnicknameExactMatchFilter) includes current user's nickname when searching from locally cached group channels - Fixed a bug where
BaseMessage.applyThreadInfoUpdateEvent()always returning false - Fixed a bug where
BaseChannel’screateMessageMetaArrayKeys,deleteMessageMetaArrayKeys,addMessageMetaArrayValues, andremoveMessageMetaArrayValuesreturning unexpected result when file message is given
v4.4.0
v4.4.0 (Feb 24, 2023)
Features
Disconnect Websocket only
When you call sb.disconnect, it disconnects the WebSocket and clears local cache. You can think of it as logging out.
In some cases, you need to only disconnect the WebSocket. You can now do it by calling sb.disconnectWebSocket.
It only disconnects the WebSocket and preserves the local cache.
sb.disconnectWebSocket();
To connect again after disconnecting with disconnectWebSocket(),
use sb.connect().
const user = await sb.connect(userId: userId);
Added appStateToggleEnabled param
Added SendbirdChatParams.appStateToggleEnabled which can be used to optionally disable internal control of Websocket connection on document.visibilityState change
Improvements
- Fixed a bug where changed
groupChannel.memberswas not updated while disconnected
v4.3.1
v4.3.1 (Feb 15, 2023)
Improvements
- Fixed a bug where
poll.votedOptionIdsis not updated upon callingpoll.applyPollUpdateEvent(pollUpdateEvent) - Fixed a bug where auto-resending file message fails occasionally
MessageCollectionEventHandler.onMessagesDeleted- Added a new parameter
messages: BaseMessage[] - Deprecated
messageIds: number[] onMessagesDeletedcallback now returns either unsent or sent messages through a new parametermessages: BaseMessage[], which you can use to remove pending messages
- Added a new parameter
- Fixed a bug where
MessageRequestHandler.onPendingis called when pending message is marked for auto-resend - Fixed a bug where
MessageCollection.hasNextremains true afterMessageCollection.initialize()is called withstartingPointas now - Fixed a bug where SDK calls
MessageCollectionEventHandlerwhen handler has not been set - Fixed a bug where
MessageCollectionEventHandler.onMessagesUpdatedis called on update ofGroupChannelsgetUnreadMemberCountandgetUndeliveredMemberCount - Deprecated
EVENT_MESSAGE_READandEVENT_MESSAGE_DELIVEREDinMessageEventSource - Exported
BaseMessageCreateParamsandBaseMessageUpdateParams - Improved stability
v4.3.0
Changelog
v4.3.0 (Feb 01, 2023)
Features
Participant class in Open Channel
Participant is a new interface for User who joined Open Channel. It's optimized for scalability and contains much lighter information about the User than a Member in Group Channel.
Now clients can implement Open Channels easier in SDK with more built-in capabilities. You can compare how Member, Participant, and User are different here
Participantholds essential information about the participant like below. They contain their muted status (is_muted) on top of basic User information
class Participant extends User {
readonly isMuted: boolean;
}
ParticipantListQuery.next()now returnsPromise<Participant[]>- For backward compatibility, the return type remains as
Promise<User[]>, but the return value can be casted intoPromise<Participant[]>
v4.2.9
Changelog
v4.2.9 (Feb 01, 2023)
Features
- Added
SendbirdChatOptions.sessionTokenRefreshTimeout. You can now set longer timeout value for session token expire. (Default: 60s, Maximum: 1800s). This means that Sendbird SDK will wait longer for your new session token, making it easier for you to reconnect to our service.
Improvements
- Improved stability