Fired when a new message has been added to the conversation.
Parameters:
message
- message that has been addedFired when message is removed from the conversation's message list.
Parameters:
message
- message that has been removedFired when data of a message has been updated.
Parameters:
data
- info object provided with the event. It has the
following properties:message
- message that has received the updateupdateReasons
- array of reasons for
the updateFired when a participant has joined the conversation.
Parameters:
participant
- participant that joined the
conversationFired when a participant has left the conversation.
Parameters:
participant
- participant that left the
conversationFired when data of a participant has been updated.
Parameters:
data
- info object provided with the event. It has the
following properties:participant
- participant that has received the
updateupdateReasons
- array of reasons
for the updateFired when the conversation was destroyed or the currently-logged-in user has left private conversation.
Parameters:
conversation
- conversation that has been removedFired when a participant has stopped typing.
Parameters:
participant
- the participant that has stopped
typingFired when a participant has started typing.
Parameters:
participant
- the participant that has started
typingFired when the data of the conversation has been updated.
Parameters:
data
- info object provided with the event. It has the
following properties:conversation
- conversation that has received
the updateupdateReasons
- array of reasons
for the updateUnique system identifier of the conversation.
Custom attributes of the conversation.
Identity of the user that created this conversation.
Date this conversation was created on.
Date this conversation was last updated on.
Name of the conversation.
Last message sent to this conversation.
Index of the last message the user has read in this conversation.
Current conversation limits.
User notification level for this conversation.
State of the conversation.
Status of the conversation.
Unique name of the conversation.
Add a participant to the conversation by its identity.
Identity of the Client to add.
Attributes to be attached to the participant.
The added participant.
Add a non-chat participant to the conversation.
Proxy (Twilio) address of the participant.
User address of the participant.
Attributes to be attached to the participant.
Options for adding email participants - name and CC/To level.
The added participant.
Advance the conversation's last read message index to the current read horizon. Rejects if the user is not a participant of the conversation. Last read message index is updated only if the new index value is higher than the previous.
Message index to advance to.
Resulting unread messages count in the conversation.
Delete the conversation and unsubscribe from its events.
Get the custom attributes of this Conversation.
Returns messages from the conversation using the paginator interface.
Number of messages to return in a single chunk. Default is 30.
Index of the newest message to fetch. Default is from the end.
Query direction. By default, it queries backwards
from newer to older. The "forward"
value will query in the opposite
direction.
A page of messages.
Get the total message count in the conversation.
This method is semi-realtime. This means that this data will be eventually correct, but will also be possibly incorrect for a few seconds. The Conversations system does not provide real time events for counter values changes.
This is useful for any UI badges, but it is not recommended to build any core application logic based on these counters being accurate in real time.
Get a participant by its identity.
Participant identity.
Get a participant by its SID.
Participant SID.
Get a list of all the participants who are joined to this conversation.
Get conversation participants count.
This method is semi-realtime. This means that this data will be eventually correct, but will also be possibly incorrect for a few seconds. The Conversations system does not provide real time events for counter values changes.
This is useful for any UI badges, but it is not recommended to build any core application logic based on these counters being accurate in real time.
Get count of unread messages for the user if they are a participant of this conversation. Rejects if the user is not a participant of the conversation.
Use this method to obtain the number of unread messages together with Conversation.updateLastReadMessageIndex instead of relying on the message indices which may have gaps. See Message.index for details.
This method is semi-realtime. This means that this data will be eventually correct, but it will also be possibly incorrect for a few seconds. The Conversations system does not provide real time events for counter values changes.
This is useful for any UI badges, but it is not recommended to build any core application logic based on these counters being accurate in real time.
If the read horizon is not set, this function will return null. This could mean
that all messages in the conversation are unread, or that the read horizon system
is not being used. How to interpret this null
value is up to the customer application.
Number of unread messages based on the current read horizon set for
the user or null
if the read horizon is not set.
Join the conversation and subscribe to its events.
Leave the conversation.
New interface to prepare for sending a message. Use this instead of Conversation.sendMessage.
A MessageBuilder to help set all message sending options.
Remove a participant from the conversation. When a string is passed as the argument, it will assume that the string is an identity or SID.
Identity, SID or the participant object to remove.
Send a message to the conversation.
Message body for the text message,
FormData
or SendMediaOptions for media content. Sending FormData
is supported only with the browser engine.
Attributes for the message.
Email options for the message.
Index of the new message.
Set last read message index of the conversation to the index of the last known message.
Resulting unread messages count in the conversation.
Set all messages in the conversation unread.
New count of unread messages after this update.
Set user notification level for this conversation.
New user notification level.
Send a notification to the server indicating that this client is currently typing in this conversation. Typing ended notification is sent after a while automatically, but by calling this method again you ensure that typing ended is not received.
Update the attributes of the conversation.
New attributes.
Update the friendly name of the conversation.
New friendly name.
Set the last read message index to the current read horizon.
Message index to set as last read. If null is provided, then the behavior is identical to Conversation.setAllMessagesUnread.
New count of unread messages after this update.
Update the unique name of the conversation.
New unique name for the conversation. Setting unique name to null removes it.
A conversation represents communication between multiple Conversations clients.