Skip to content

Releases: sendbird/sendbird-chat-sdk-javascript

v4.8.0

08 May 16:14
Compare
Choose a tag to compare

PinnedMessageListQuery

You can now retrieve all pinned messages in a GroupChannel by the PinnedMessageListQuery.

  • Added PinnedMessage
  • Added PinnedMessageListQuery, PinnedMessageListQueryParams
  • Added groupChannel.createPinnedMessageListQuery()
const query = groupChannel.createPinnedMessageListQuery(params);
const pinnedMessages = await query.next();

Improvements

Improvements stability

v4.7.2

19 Apr 04:00
Compare
Choose a tag to compare

Improvements

  • Fixed a bug where MessageCollection.initialize() would throw an Error in some cases

v4.7.1

18 Apr 06:32
Compare
Choose a tag to compare

Improvements

  • Fixed a bug on AbortController import

v4.7.0

17 Apr 06:29
Compare
Choose a tag to compare

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 LOGI error command processing
  • Added collection.close() when disconnect() is called
  • Added support for AbortController compatibility
  • Improved stability

v4.6.2

05 Apr 05:45
Compare
Choose a tag to compare

Improvements

  • Fixed a bug where GroupChannelCollection could not handle EVENT_MESSAGE_SENT

v4.6.1

29 Mar 14:05
Compare
Choose a tag to compare

Improvements

  • Added fetch polyfill with AbortController support
  • Fixed a bug where messages in MessageCollection not carrying parentMessage value when they should
  • Improved stability

v4.6.0

16 Mar 06:32
Compare
Choose a tag to compare

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 MemoryStore when SDK is running in a browser that does not support indexedDB
  • Improvement stability

v4.5.0

03 Mar 08:53
Compare
Choose a tag to compare

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, and onPollDeleted in OpenChannelHandlerParams
  • Moved following methods from GroupChannel to BaseChannel:
    • updatePoll()
    • deletePoll()
    • closePoll()
    • addPollOption()
    • updatePollOption()
    • deletePollOption()
    • votePoll()
    • getPollChangeLogsSinceTimestamp()
    • getPollChangeLogsSinceToken()
    • createPollListQuery()
    • createPollVoterListQuery()

Improvements

  • Fixed a bug where GroupChannelFilter using nicknames (nicknameContainsFilter, nicknameExactMatchFilter, and nicknameExactMatchFilter) 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’s createMessageMetaArrayKeys, deleteMessageMetaArrayKeys, addMessageMetaArrayValues, and removeMessageMetaArrayValues returning unexpected result when file message is given

v4.4.0

24 Feb 08:06
Compare
Choose a tag to compare

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.members was not updated while disconnected

v4.3.1

15 Feb 07:57
Compare
Choose a tag to compare

v4.3.1 (Feb 15, 2023)

Improvements

  • Fixed a bug where poll.votedOptionIds is not updated upon calling poll.applyPollUpdateEvent(pollUpdateEvent)
  • Fixed a bug where auto-resending file message fails occasionally
  • MessageCollectionEventHandler.onMessagesDeleted
    • Added a new parameter messages: BaseMessage[]
    • Deprecated messageIds: number[]
    • onMessagesDeleted callback now returns either unsent or sent messages through a new parameter messages: BaseMessage[], which you can use to remove pending messages
  • Fixed a bug where MessageRequestHandler.onPending is called when pending message is marked for auto-resend
  • Fixed a bug where MessageCollection.hasNext remains true after MessageCollection.initialize() is called with startingPoint as now
  • Fixed a bug where SDK calls MessageCollectionEventHandler when handler has not been set
  • Fixed a bug where MessageCollectionEventHandler.onMessagesUpdated is called on update of GroupChannels getUnreadMemberCount and getUndeliveredMemberCount
  • Deprecated EVENT_MESSAGE_READ and EVENT_MESSAGE_DELIVERED in MessageEventSource
  • Exported BaseMessageCreateParams and BaseMessageUpdateParams
  • Improved stability