Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here.
If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.
We recommend using the following references in your projects. As we make patch releases, these links will automatically include those fixes with full backwards compatibility.
npm install --save twilio-chat
Twilio Programmable Chat SDKs use Semantic Versioning. Twilio supports version N-1 for 12 months after the first GA release of version N. We recommend that you upgrade to the latest version as soon as possible to avoid any breaking changes. Version 5.x is the latest generation of the Javascript client SDK.
Support for 4.x will cease on May 17, 2022. Please upgrade to the latest version.
Support for 3.x ceased on July 17, 2021.
End-of-Life for 2.x occurred on May 18, 2020.
End-of-Life for 1.x occurred on June 30, 2019.
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.
.onWithReplay()
function to Conversation entities which could be used to subscribe to an event with replay. Upon subscribing, the most recent event (if any) will be re-emitted.
gulp
to
rollup
. Unfortunately, this caused change in the type exports. While not affecting the deployments in the wild, it made TS compilation impossible. The fix for it is deployed in 5.0.2 so please
do not use
this version explicitly.
Channel.updateAttributes()
will resolve successfully while
Channel#attributes
still contains the old value. To see the new value, we recommend waiting for an
#updated
event.
null
to
Channel.sendMessage
will result with the message body being an empty string.
User.updateFriendlyName
no longer accepts null as the value.
Channel.updateFriendlyName
no longer accepts null as the value.
Message.timestamp
renamed to
Message.dateCreated
.
Channel.lastMessage.timestamp
also renamed to
Channel.lastMessage.dateCreated
.
timestamp
for
Message
objects got also renamed to
dateCreated
.
"known"
renamed to
"notParticipating"
.
Media.getContentUrl
renamed to
Media.getContentTemporaryUrl
.
attributes
arguments now accept all valid JSON values (numbers, strings, objects, arrays, Booleans, nulls).
state
property to the Channel class which reflects the Conversations state.
Client.setPushRegistrationId
/
Client.unsetPushRegistrationId
to resolve only after successful operation.
Client#channelRemoved
event correctly for private channels.
Channel#removed
event.
isomorphic-form-data
from dependencies.
Channel.getMemberBySid
method to get Member by provided Sid
Channel.getMemberByIdentity
method to get Member by provided Identity
Channel.createdBy
can be null
Message.member_sid
property
Message.author
can be null
Message.getMember
method to get authoring Member of Message by
member_sid
(if available) and if not found then by
author
(identity)
Client#event:connectionError
event.
User
,
Member
,
Channel
,
Message
In this release we are introducing Member Attributes and the ability to change them.
dateCreated
,
dateUpdated
,
type
, and
attributes
properties to
Member
class
Member.updateAttributes
method to set a Member's Attributes (requires new permissions to be added to the according role:
editOwnMemberAttributes
or
editAnyMemberAttributes
)
In this release we are introducing a User Notification Level to each Channel. The assigned level determines whether the currently logged-in User will receive pushes for that Channel. The assigned level be any of muted
or default
, where default
defers to global Chat Service push configuration.
Channel.setUserNotificationLevel
method to set User's Notification level
notificationLevel
property to
Channel
class
@types\loglevel
package is not required anymore in TypeScript projects using
twilio-chat
In this release we have revised all updated events. Each revised event now receives an object which contains:
channel
,
member
,
message
,
user
attributes
,
friendlyName
,
body
, etc.
Additionally, the Channel.LastMessage
structure is updated to contain only last message's creation timestamp
and index
(effectively removing author
and sid
)
Client#event:channelUpdated
Channel#event:updated
Client#event:memberUpdated
Channel#event:memberUpdated
Member#event:updated
Client#event:messageUpdated
Channel#event:messageUpdated
Message#event:updated
Client#event:userUpdated
User#event:updated
channel.sendMessage()
promise resolve type to
Promise<number>
logLevel
is now set to
silent
, log lines now includes timestamp
sid
and
author
properties from
Channel.LastMessage
type
Client.shutdown()
, introducing new types for various methods
tokenAboutToExpire
,
tokenExpired
(essentially removing need for
AccessManager
use)
index
property to
Channel.LastMessage
type
For older changelog entries including 2.x, click Changelog