We recommend using these links in your projects. As we patch bugs, these links will automatically be updated with the fixes.
Links are provided to specific patch versions here. We don't recommend using these links unless you have a specific need for a certain patch of a release.
In this release we have revised all updated events. Each revised event now receives an object which contains:
Channel.LastMessage structure is updated to contain only last message's creation
index (effectively removing
channel.sendMessage()promise resolve type to
logLevelis now set to
silent, log lines now includes timestamp
Client.shutdown(), introducing new types for various methods
tokenExpired(essentially removing need for
Client.unsetPushRegistrationIdto unregister from push notifications
Client.getLocalChannelsto get (sorted) locally known channels, sorting is possible by
ClientOptionsbetween two clients creations in the same browser or node.js session
bodyproperty now is null (instead of placeholder about unsupported media messaging)
This release is identical to 2.0.0. The sole purpose is to publish the new version to npmjs.com.
Client constructor and
Client.initialize function, the correct way now is to use static function
Behavioral breaking change in adding Member and joining Channel, now if User is already in the Channel, then
Channel.join will throw
SessionError. Changed function signature in Consumption Horizon functions, after successful setting of last message consumed these functions returns unread messages count in given Channel for logged in User.
Channel.joinfunctions will throw an
SessionErrorin case of User already exists in the Channel
Promise<number>with count of unread messages in the channel after the operation:
Client.versionproperty now correctly displays Client's version
Channel.sendMessagemethod you can provide
FormData(for browsers) or
SendMediaOptions(browsers and node.js apps) to send media from your client
Messageclass is extended with
Messageclass is extended with
mediaattribute which holds
sendMediaMessagepermission for users to be able to send Media Messages
PushNotificationinterface for push notification representation
Client.parsePushNotificationto handle push payload and return the
PushNotificationinstance back to client (intended use is Firebase service worker)
messageRemovedevents were not correctly firing for messages that present at client init (i.e. not added after client init)
Client initialization has been simplified to reflect most users typical usage of the system. All user channels (channels for which the current user is joined to or an owner of) will be subscribed to from client startup but only the members roster will be synchronized initially. This keeps client startup fast while still reflecting the latest activity immediately to the client.
UserInfo has been deprecated and replaced with two distinct classed,
UserDescriptor. Similar to
ChannelDescriptor class, a
UserDescriptor represents a snapshot of data in time that should be utilized directly after obtaining it but not retained since it will not be updated with new data over time.
Users are no longer implicitly subscribed to to improve performance on large instances. You can subscribe up to a maximum 100 of users at once after which your least recently subscribed User will be unsubscribed.
channelAddedevent for public channels being joined was correctly fired again
endpoint_ididentifier specified in access tokens is now automatically generated and persisted in the client browser cache. The following should be observed with this change:
endpoint_idis no longer a required identifier in your generated access tokens, you may omit it from this build forward
endpoint_idwill be ignored if specified with your access token
directionparameter to channel.getMessage method.
backwardsis default direction to keep api compatible with previous versions
anchorparameter in channel.getMessage method was incorrectly processed.
getChannelByUniqueNamediretly after the client start
client.identityproperty. Use client.userInfo.identity