Changelog: Twilio Chat JavaScript SDK

Latest releases for the Programmable Chat JavaScript SDK

We recommend using these links in your projects. As we patch bugs, these links will automatically be updated with the fixes.

Programmable Chat JS v1.2

Migrating from Beta to GA

Programmable Chat is now in GA. A number of breaking changes were introduced as part of the GA release. To see what has changed and to migrate from the latest Beta SDK to the new GA SDK, please read the GA Migration Guide for JavaScript.

Migrating from IP Messaging to Programmable Chat

Programmable Chat is the new name of what was previously called IP Messaging. If you are an existing IP Messaging user, you will want to follow the Migration Guide for JavaScript.

If you are looking for the archived IP Messaging JavaScript changelog, it can be found here.

Change Logs

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.


Programmable Chat 1.2.1 (October 12, 2017)

Bug Fixes

  • Fixed incorrect handling of network timeouts in React Native
  • Fixed session errors handling

Programmable Chat 1.2.0 (September 18, 2017)

New Features

  • Added Multimedia Messaging (beta) API (see Media Support for more information). Note: Sending media messages on existing instances requires adding a new permission in your channel roles.
  • in Channel.sendMessage method you can provide FormData (for browsers) or SendMediaOptions (browsers and node.js apps) to send media from your client
  • Message class is extended with type attribute
  • Message class is extended with media attribute which holds Media class instance
  • role should contain Channel level sendMediaMessage permission for users to be able to send Media Messages

Programmable Chat 1.1.2 (August 22, 2017)

Bug Fixes

  • Fixed a big in client creation which caused the operation to fail in rare cases

Programmable Chat 1.1.1 (August 16, 2017)

Changes

  • added PushNotification interface for push notification representation
  • added Client#event:pushNotification event
  • added static method Client.parsePushNotification to handle push payload and return the PushNotification instance back to client (intended use is Firebase service worker)

Bug Fixes

  • Fixed unhandled promise rejections on new client creation in some rare cases
  • SDK Reference Documentation fixes and updates

Programmable Chat 1.0.4 (July 14, 2017)

Bug Fixes

  • Fixed additional issues related to Channel and ChannelDescriptor status updates not behaving as expected (which were not addressed in the 1.0.3 release)

Programmable Chat 1.0.3 (July 12, 2017)

Bug Fixes

  • Fixed issues related to Channel status and uniqueName updates not behaving as expected
  • SDK Reference Documentation fixes and updates

Programmable Chat 1.0.2 (July 4, 2017)

Changes

  • Improvements made to the reliability of retrieval of Channel and User Descriptors

Bug Fixes

  • Fix for clients with identities containing spaces / pluses / etc. during fetching Channel Descriptors
  • Fix for object properties accessors in User, Member, Channel, Message
  • Documentation fixes

Programmable Chat 1.0.1 (May 19, 2017)

Changes

  • Added a new Factory method for creating the SDK Chat Client instance, specifically to avoid issues caused by using client that was created but not fully initialized. Note that the old manual constructor has been marked as deprecated.

Bug Fixes

  • Fixed a rare issue whereby the client did not correctly initialise. This caused the typing indicator feature not to work correctly
  • Fixed an issue whereby messageRemoved events were not correctly firing for messages that present at client init (i.e. not added after client init)
  • The JS library should now be React Native friendly
  • Various Documentation fixes

Programmable Chat 1.0.0 (May 2, 2017)

Overview

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, User and 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.

Changelog

  • Removed
    • Client.getPublicChannels() function
    • Client.getUserChannels() function
    • Client#event:userInfoUpdated event
    • Member.userInfo property
    • Member#event:userInfoUpdated event
    • UserInfo class
  • Added
    • Channel.getUserDescriptors() function
    • ChannelDescriptor.isPrivate property
    • ChannelDescriptor.lastConsumedMessageIndex property
    • ChannelDescriptor.status property
    • ChannelDescriptor.type property
    • Client.getPublicChannelDescriptors() function
    • Client.getSubscribedChannels() function
    • Client.getSubscribedUsers() function
    • Client.getUser(identity) function
    • Client.getUserChannelDescriptors() function
    • Client.getUserDescriptor(identity) function
    • Client#event:userSubscribed event
    • Client#event:userUnsubscribed event
    • Client#event:userUpdated event
    • Member.getUser() function
    • Member.getUserDescriptor() function
    • new User class
    • new UserDescriptor class

Programmable Chat 0.13.0 (March 30, 2017)

Changelog:

  • Enable optimised UserInfo retrieval

Bug Fixes

  • Fixed a bug whereby a Client init race condition caused issues in some browsers (EDGE and other browsers more rarely)
  • Ensure callbacks will arrive for channel left (fixed a race)
  • Fixed an issue whereby leaving and rejoining a channel caused events to not be received after the rejoin
  • Fixed an issue so that the channelAdded event for public channels being joined was correctly fired again

Programmable Chat 0.12.0 (February 23, 2017)

Changelog:

  • The endpoint_id identifier specified in access tokens is now automatically generated and persisted in the client browser cache. The following should be observed with this change:
    • endpoint_id is no longer a required identifier in your generated access tokens, you may omit it from this build forward
    • endpoint_id will be ignored if specified with your access token
  • Added a direction parameter to channel.getMessage method. backwardsis default direction to keep api compatible with previous versions

Bug Fixes

  • Fixed a bug whereby the anchor parameter in channel.getMessage method was incorrectly processed.

Programmable Chat 0.11.1 (December 7, 2016)

Bug fixes:

  • Fixed an issue where sometimes a 404 error was returned when querying a channel for messages and members, when the channel was retreived through getChannelBySid and getChannelByUniqueName diretly after the client start
  • Fixed an issue where the client sometimes failed to successfully start with a subscription setup error
  • Fixed an issue where under certain conditions, the incorrect connection state was for the client instance

Programmable Chat 0.11.0 (November 21, 2016)

Changelog:

  • constructor doesn't accept AccessManager interface anymore. Just token. Also user has to call client.updateToken himself when needed.
  • removed client.identity property. Use client.userInfo.identity
  • client.getUserChannels is now paged and returns only channels which are related to the identity (statuses are: invited, joined, and private channels)
  • client.getPublicChannels returns list of channelDescriptor, also in paged manner
  • channel.getMessagesPaged is removed
  • channel.getMessages() returns paginator instead of array
  • Added counter methods: channel.getMessagesCount, channel.getUnreadMessagesCount, channel.getMembersCount
  • userInfo#updated event now also reports a name of a key which has been updated

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.