Components | Description |
---|---|
Conversations | The Conversations component is designed to display a list of either User or Group . This essentially represents your recent conversation history. |
Messages | The Messages component is designed to manage the messaging interaction for either individual User or Group conversations. |
Contacts | The CometChatContacts component is specifically designed to facilitate the display and management of both User and Groups . |
ItemClickListener
of the Conversation Component, ConversationsWithMessages achieves navigation from Conversation to Messages component.
User
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The ConversationsWithMessages does not generate its events but its component does. For a full list of these events, you can refer to Conversations events and Messages events.
In the following example, we’re incorporating observers for the ConversationDeleted
event of Conversations
and the MessageSent
event of the Messages
component.
.setUser(user)
function with a User object as input to ConversationsWithMessages. This will automatically guide you to the Messages component for the designated User
.
.setGroup(group)
function with a Group object as input to ConversationsWithMessages. This will automatically guide you to the Messages component for the designated Group
.
Conversations
subcomponent to navigate the user from Conversations to Contacts
Messages
subcomponent to navigate the user from Messages to Details.
.setMenu()
, the default behavior of ConversationsWithMessages will also be overridden.Conversations
, Messages
, and Contacts
component. Hence, each of these components will have its individual `Configuration“.
Configurations
expose properties that are available in its individual components..setConversationsConfiguration()
method as demonstrated below:
ConversationsConfiguration
can be found under Conversations. Properties marked with the 🛑 symbol are not accessible within the Configuration Object.
Example
Let’s say you want to change the style of the Conversations subcomponent and, in addition, you only want to display users in the conversation list.
You can modify the style using the .setStyle()
method and filter the list with the .setConversationsRequestBuilder()
method.