The Conversations SDK is event-driven. Objects from the SDK will emit real-time events based on state changes in your Conversations instance. You can use these events to update your application's state and UI.
The SDK emits events on several objects (i.e. Client, Conversation, User, etc.).
These events are emitted, for example, when:
friendlyName
of a Conversation is updatedA full list of events and objects can be found by referring to our generated SDK documentation:
1/* event handler examples */23client.on("conversationUpdated", ({conversation, updateReasons}) => {4// Fired when the attributes or the metadata of a conversation have been updated5});67conversation.on("messageUpdated", ({message, updateReasons}) => {8// Fired when data of a message has been updated.9});1011participant.on("updated", ({participant, updateReasons}) => {12// Fired when the fields of the participant have been updated.13});
TwilioConversationsClientDelegate
.ConversationsClientListener
. Other events are available from the ConversationListener
and MediaUploadListener
.As a next step, you can visit the following guides: