> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-v6-beta2-flutter-uikit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Conversations

> Fetch recent one-on-one and group conversations for the logged-in user using the ConversationsRequestBuilder, with support for filtering, tagging, and pagination.

<Info>
  **Quick Reference for AI Agents & Developers**

  ```javascript theme={null}
  // Build a conversations request
  let conversationsRequest = new CometChat.ConversationsRequestBuilder()
    .setLimit(30)
    .build();

  // Fetch conversations (paginated)
  conversationsRequest.fetchNext().then(
    conversationList => console.log("Conversations:", conversationList),
    error => console.log("Error:", error)
  );

  // Retrieve a single conversation
  CometChat.getConversation("UID_OR_GUID", "user_or_group").then(
    conversation => console.log("Conversation:", conversation),
    error => console.log("Error:", error)
  );
  ```
</Info>

Conversations provide the last messages for every one-on-one and group conversation the logged-in user is a part of. This makes it easy for you to build a **Recent Chat** list.

<Note>
  **Available via:** [SDK](/sdk/react-native/retrieve-conversations) | [REST API](/rest-api/conversations/list-conversations) | [UI Kits](/ui-kit/react-native/core-features#conversation-and-advanced-search)
</Note>

## Retrieve List of Conversations

*In other words, as a logged-in user, how do I retrieve the latest conversations that I've been a part of?*

To fetch the list of conversations, you can use the `ConversationsRequest` class. To use this class i.e. to create an object of the `ConversationsRequest` class, you need to use the `ConversationsRequestBuilder` class. The `ConversationsRequestBuilder` class allows you to set the parameters based on which the conversations are to be fetched.

The `ConversationsRequestBuilder` class allows you to set the below parameters:

### Set Limit

This method sets the limit i.e. the number of conversations that should be fetched in a single iteration.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .build();  
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .build();
    ```
  </Tab>
</Tabs>

### Set Conversation Type

This method can be used to fetch user or group conversations specifically. The `conversationType` variable can hold one of the below two values:

* user - Only fetches user conversation.
* group - Only fetches group conversations.

If none is set, the list of conversations will include both user and group conversations.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationType = "group";
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setConversationType(conversationType)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationType: string = "group",
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setConversationType(conversationType)
        .build();
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects (group conversations only):

  <span id="conv-type-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                            |
  | --------------------- | ------ | ------------------------------ | ------------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"group_group_1748415903905"`                           |
  | `conversationType`    | string | Type of conversation           | `"group"`                                               |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                     |
  | `lastReadMessageId`   | string | ID of last read message        | `"25243"`                                               |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                     |
  | `latestMessageId`     | string | ID of latest message           | `"25243"`                                               |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-type-lastmessage-object)            |
  | `conversationWith`    | object | Group details                  | [See below ↓](#conv-type-conversationwith-group-object) |

  ***

  <span id="conv-type-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                    |
  | ---------------- | ------- | --------------------------------- | ----------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25243"`                                       |
  | `conversationId` | string  | Conversation identifier           | `"group_group_1748415903905"`                   |
  | `receiverId`     | string  | Group's GUID                      | `"group_1748415903905"`                         |
  | `receiverType`   | string  | Type of receiver                  | `"group"`                                       |
  | `type`           | string  | Message type                      | `"text"`                                        |
  | `category`       | string  | Message category                  | `"message"`                                     |
  | `text`           | string  | Message text content              | `"Susan here "`                                 |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771413931`                                    |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771413931`                                    |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-type-sender-object)         |
  | `receiver`       | object  | Receiver group details            | [See below ↓](#conv-type-receiver-group-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-type-data-object)           |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-type-metadata-object)       |
  | `reactions`      | array   | Message reactions                 | `[]`                                            |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                            |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                         |

  ***

  <span id="conv-type-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-4"`                                                     |
  | `name`          | string  | User's display name                    | `"Susan Marie"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-4.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"admin"`                                                               |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771413925`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-type-receiver-group-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object (Group):**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1748415903905"`       |
  | `name`               | string  | Group's display name            | `"3 People Group"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1748415903905"` |
  | `owner`              | string  | Group owner's UID               | `"123456"`                    |
  | `scope`              | string  | Current user's scope in group   | `"admin"`                     |
  | `membersCount`       | number  | Total members in group          | `12`                          |
  | `onlineMembersCount` | number  | Online members count            | `3`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                       |
  | `joinedAt`           | number  | Timestamp when user joined      | `1748415973`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1748415957`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1771245340`                  |

  ***

  <span id="conv-type-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                  | Sample Value                                   |
  | ---------- | ------ | ---------------------------- | ---------------------------------------------- |
  | `text`     | string | Message text                 | `"Susan here "`                                |
  | `resource` | string | SDK resource identifier      | `"REACT_NATIVE-4_0_12-..."`                    |
  | `entities` | object | Sender and receiver entities | [See below ↓](#conv-type-data-entities-object) |
  | `metadata` | object | Injected metadata            | [See below ↓](#conv-type-data-metadata-object) |

  ***

  <span id="conv-type-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                            |
  | ---------- | ------ | ----------------------- | ------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-type-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-type-data-entities-receiver-object) |

  ***

  <span id="conv-type-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                 |
  | ------------ | ------ | ------------------- | ------------------------------------------------------------ |
  | `entityType` | string | Type of entity      | `"user"`                                                     |
  | `entity`     | object | User entity details | [See below ↓](#conv-type-data-entities-sender-entity-object) |

  ***

  <span id="conv-type-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-4"`                                                     |
  | `name`         | string | User's display name      | `"Susan Marie"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-4.webp"` |
  | `role`         | string | User's role              | `"admin"`                                                               |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771413925`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-type-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description          | Sample Value                                                   |
  | ------------ | ------ | -------------------- | -------------------------------------------------------------- |
  | `entityType` | string | Type of entity       | `"group"`                                                      |
  | `entity`     | object | Group entity details | [See below ↓](#conv-type-data-entities-receiver-entity-object) |

  ***

  <span id="conv-type-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1748415903905"`       |
  | `name`               | string  | Group's display name            | `"3 People Group"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1748415903905"` |
  | `owner`              | string  | Group owner's UID               | `"123456"`                    |
  | `scope`              | string  | Current user's scope in group   | `"admin"`                     |
  | `membersCount`       | number  | Total members in group          | `12`                          |
  | `onlineMembersCount` | number  | Online members count            | `3`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `joinedAt`           | number  | Timestamp when user joined      | `1748415973`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1748415957`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1771245340`                  |

  ***

  <span id="conv-type-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                            |
  | ----------- | ------ | ------------------------ | ------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-type-data-metadata-injected-object) |

  ***

  <span id="conv-type-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                              |
  | ------------ | ------ | --------------- | --------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-type-data-metadata-extensions-object) |

  ***

  <span id="conv-type-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                               |
  | -------------- | ------ | ---------------------- | ---------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-type-data-metadata-linkpreview-object) |

  ***

  <span id="conv-type-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-type-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                       |
  | ----------- | ------ | ------------------------ | -------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-type-metadata-injected-object) |

  ***

  <span id="conv-type-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                         |
  | ------------ | ------ | --------------- | ---------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-type-metadata-extensions-object) |

  ***

  <span id="conv-type-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                          |
  | -------------- | ------ | ---------------------- | ----------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-type-metadata-linkpreview-object) |

  ***

  <span id="conv-type-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-type-conversationwith-group-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (Group):**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1748415903905"`       |
  | `name`               | string  | Group's display name            | `"3 People Group"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1748415903905"` |
  | `owner`              | string  | Group owner's UID               | `"123456"`                    |
  | `scope`              | string  | Current user's scope in group   | `"admin"`                     |
  | `membersCount`       | number  | Total members in group          | `12`                          |
  | `onlineMembersCount` | number  | Online members count            | `1`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                       |
  | `joinedAt`           | number  | Timestamp when user joined      | `1748437105`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1748415957`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1771245340`                  |
</Accordion>

### With User and Group Tags

This method can be used to fetch the user/group tags in the `Conversation` Object. By default the value is false.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .withUserAndGroupTags(true)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .withUserAndGroupTags(true)
        .build();
    ```
  </Tab>
</Tabs>

<Note>
  `withUserAndGroupTags(true)` adds the `tags` array to the `conversationWith` object (user/group tags). The tags you see inside `lastMessage.data.entities` and `sender`/`receiver` are part of the message payload, not the conversation's `conversationWith` object.
</Note>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects with user/group tags:

  <span id="conv-usrgrptags-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                            |
  | --------------------- | ------ | ------------------------------ | ------------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-2_user_cometchat-uid-3"`                |
  | `conversationType`    | string | Type of conversation           | `"user"`                                                |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                     |
  | `lastReadMessageId`   | string | ID of last read message        | `"25276"`                                               |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                     |
  | `latestMessageId`     | string | ID of latest message           | `"25276"`                                               |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-usrgrptags-lastmessage-object)      |
  | `conversationWith`    | object | User details with tags         | [See below ↓](#conv-usrgrptags-conversationwith-object) |

  ***

  <span id="conv-usrgrptags-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                                  |
  | ---------------- | ------- | --------------------------------- | ------------------------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25276"`                                                     |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-2_user_cometchat-uid-3"`                      |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-2"`                                           |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                                      |
  | `type`           | string  | Message type                      | `"text"`                                                      |
  | `category`       | string  | Message category                  | `"message"`                                                   |
  | `text`           | string  | Message text content              | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771495242`                                                  |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771495244`                                                  |
  | `readAt`         | number  | Unix timestamp when read          | `1771495244`                                                  |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771495244`                                                  |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-usrgrptags-sender-object)                 |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-usrgrptags-receiver-object)               |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-usrgrptags-data-object)                   |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-usrgrptags-metadata-object)               |
  | `reactions`      | array   | Message reactions                 | `[]`                                                          |
  | `mentionedUsers` | array   | Users mentioned in message        | [See below ↓](#conv-usrgrptags-mentionedusers-array)          |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `true`                                                        |

  ***

  <span id="conv-usrgrptags-mentionedusers-array" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.mentionedUsers` Array (per item):**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771738926`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |

  ***

  <span id="conv-usrgrptags-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`          | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771495034`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `["userTag2"]`                                                          |

  ***

  <span id="conv-usrgrptags-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771494233`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `["userTag1"]`                                                          |

  ***

  <span id="conv-usrgrptags-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                   | Sample Value                                                  |
  | ---------- | ------ | ----------------------------- | ------------------------------------------------------------- |
  | `text`     | string | Message text                  | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `resource` | string | SDK resource identifier       | `"REACT_NATIVE-4_0_14-..."`                                   |
  | `mentions` | object | Map of mentioned users by UID | [See below ↓](#conv-usrgrptags-data-mentions-object)          |
  | `entities` | object | Sender and receiver entities  | [See below ↓](#conv-usrgrptags-data-entities-object)          |
  | `metadata` | object | Injected metadata             | [See below ↓](#conv-usrgrptags-data-metadata-object)          |

  ***

  <span id="conv-usrgrptags-data-mentions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.mentions` Object (keyed by UID):**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`         | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`       | string | URL to user's avatar     | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `lastActiveAt` | number | Last active timestamp    | `1771494233`                                                            |

  ***

  <span id="conv-usrgrptags-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                                  |
  | ---------- | ------ | ----------------------- | ------------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-usrgrptags-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-usrgrptags-data-entities-receiver-object) |

  ***

  <span id="conv-usrgrptags-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                       |
  | ------------ | ------ | ------------------- | ------------------------------------------------------------------ |
  | `entityType` | string | Type of entity      | `"user"`                                                           |
  | `entity`     | object | User entity details | [See below ↓](#conv-usrgrptags-data-entities-sender-entity-object) |

  ***

  <span id="conv-usrgrptags-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-3"`                                                     |
  | `name`         | string | User's display name      | `"Nancy Grace"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771495034`                                                            |
  | `tags`         | array  | User tags                | `["userTag2"]`                                                          |

  ***

  <span id="conv-usrgrptags-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                         |
  | ------------ | ------ | ------------------- | -------------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                             |
  | `entity`     | object | User entity details | [See below ↓](#conv-usrgrptags-data-entities-receiver-entity-object) |

  ***

  <span id="conv-usrgrptags-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`           | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771494233`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
  | `tags`           | array  | User tags                | `["userTag1"]`                                                          |

  ***

  <span id="conv-usrgrptags-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                                  |
  | ----------- | ------ | ------------------------ | ------------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-usrgrptags-data-metadata-injected-object) |

  ***

  <span id="conv-usrgrptags-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                    |
  | ------------ | ------ | --------------- | --------------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-usrgrptags-data-metadata-extensions-object) |

  ***

  <span id="conv-usrgrptags-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                     |
  | -------------- | ------ | ---------------------- | ---------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-usrgrptags-data-metadata-linkpreview-object) |

  ***

  <span id="conv-usrgrptags-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-usrgrptags-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                             |
  | ----------- | ------ | ------------------------ | -------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-usrgrptags-metadata-injected-object) |

  ***

  <span id="conv-usrgrptags-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                               |
  | ------------ | ------ | --------------- | ---------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-usrgrptags-metadata-extensions-object) |

  ***

  <span id="conv-usrgrptags-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                |
  | -------------- | ------ | ---------------------- | ----------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-usrgrptags-metadata-linkpreview-object) |

  ***

  <span id="conv-usrgrptags-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-usrgrptags-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User with tags):**

  | Parameter        | Type    | Description                               | Sample Value                                                            |
  | ---------------- | ------- | ----------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier                  | `"cometchat-uid-3"`                                                     |
  | `name`           | string  | User's display name                       | `"Nancy Grace"`                                                         |
  | `avatar`         | string  | URL to user's avatar                      | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`         | string  | User's online status                      | `"online"`                                                              |
  | `role`           | string  | User's role                               | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                     | `1771818451`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user     | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user    | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)      | `0`                                                                     |
  | `tags`           | array   | User tags (added by withUserAndGroupTags) | `["userTag2"]`                                                          |
  | `conversationId` | string  | Conversation identifier                   | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
</Accordion>

### Set User Tags

This method fetches user conversations that have the specified tags.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let userTags = ["tag1"];
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setUserTags(userTags)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      userTags: Array<String> = ["tag1"],
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setUserTags(userTags)
        .build();
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects filtered by user tags:

  <span id="conv-usertags-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                          |
  | --------------------- | ------ | ------------------------------ | ----------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-2_user_cometchat-uid-5"`              |
  | `conversationType`    | string | Type of conversation           | `"user"`                                              |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                   |
  | `lastReadMessageId`   | string | ID of last read message        | `"24957"`                                             |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                   |
  | `latestMessageId`     | string | ID of latest message           | `"24957"`                                             |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-usertags-lastmessage-object)      |
  | `conversationWith`    | object | User details                   | [See below ↓](#conv-usertags-conversationwith-object) |

  ***

  <span id="conv-usertags-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                  |
  | ---------------- | ------- | --------------------------------- | --------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"24955"`                                     |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-2_user_cometchat-uid-5"`      |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-2"`                           |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                      |
  | `type`           | string  | Message type                      | `"text"`                                      |
  | `category`       | string  | Message category                  | `"message"`                                   |
  | `text`           | string  | Message text content              | `"Not yet, I will update you if any."`        |
  | `sentAt`         | number  | Unix timestamp when sent          | `1770973162`                                  |
  | `editedAt`       | number  | Unix timestamp when edited        | `1770973219`                                  |
  | `editedBy`       | string  | UID of user who edited            | `"cometchat-uid-5"`                           |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1770973219`                                  |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-usertags-sender-object)   |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-usertags-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-usertags-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-usertags-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                          |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                          |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                       |

  ***

  <span id="conv-usertags-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-5"`                                                     |
  | `name`          | string  | User's display name                    | `"John Paul"`                                                           |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"admin"`                                                               |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1770973064`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `["tag1"]`                                                              |

  ***

  <span id="conv-usertags-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1770973150`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `["tag1"]`                                                              |

  ***

  <span id="conv-usertags-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                  | Sample Value                                       |
  | ---------- | ------ | ---------------------------- | -------------------------------------------------- |
  | `text`     | string | Message text                 | `"Not yet, I will update you if any."`             |
  | `resource` | string | SDK resource identifier      | `"REACT_NATIVE-4_0_14-..."`                        |
  | `entities` | object | Sender and receiver entities | [See below ↓](#conv-usertags-data-entities-object) |
  | `metadata` | object | Injected metadata            | [See below ↓](#conv-usertags-data-metadata-object) |

  ***

  <span id="conv-usertags-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                                |
  | ---------- | ------ | ----------------------- | ----------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-usertags-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-usertags-data-entities-receiver-object) |

  ***

  <span id="conv-usertags-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                     |
  | ------------ | ------ | ------------------- | ---------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                         |
  | `entity`     | object | User entity details | [See below ↓](#conv-usertags-data-entities-sender-entity-object) |

  ***

  <span id="conv-usertags-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-5"`                                                     |
  | `name`         | string | User's display name      | `"John Paul"`                                                           |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp"` |
  | `role`         | string | User's role              | `"admin"`                                                               |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1770973064`                                                            |
  | `tags`         | array  | User tags                | `["tag1"]`                                                              |

  ***

  <span id="conv-usertags-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                       |
  | ------------ | ------ | ------------------- | ------------------------------------------------------------------ |
  | `entityType` | string | Type of entity      | `"user"`                                                           |
  | `entity`     | object | User entity details | [See below ↓](#conv-usertags-data-entities-receiver-entity-object) |

  ***

  <span id="conv-usertags-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`           | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"offline"`                                                             |
  | `lastActiveAt`   | number | Last active timestamp    | `1770973150`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-2_user_cometchat-uid-5"`                                |
  | `tags`           | array  | User tags                | `["tag1"]`                                                              |

  ***

  <span id="conv-usertags-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                                |
  | ----------- | ------ | ------------------------ | ----------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-usertags-data-metadata-injected-object) |

  ***

  <span id="conv-usertags-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                  |
  | ------------ | ------ | --------------- | ------------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-usertags-data-metadata-extensions-object) |

  ***

  <span id="conv-usertags-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                   |
  | -------------- | ------ | ---------------------- | -------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-usertags-data-metadata-linkpreview-object) |

  ***

  <span id="conv-usertags-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-usertags-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                           |
  | ----------- | ------ | ------------------------ | ------------------------------------------------------ |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-usertags-metadata-injected-object) |

  ***

  <span id="conv-usertags-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                             |
  | ------------ | ------ | --------------- | -------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-usertags-metadata-extensions-object) |

  ***

  <span id="conv-usertags-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                              |
  | -------------- | ------ | ---------------------- | --------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-usertags-metadata-linkpreview-object) |

  ***

  <span id="conv-usertags-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-usertags-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-5"`                                                     |
  | `name`           | string  | User's display name                    | `"John Paul"`                                                           |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp"` |
  | `status`         | string  | User's online status                   | `"offline"`                                                             |
  | `role`           | string  | User's role                            | `"admin"`                                                               |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771668031`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-2_user_cometchat-uid-5"`                                |
</Accordion>

### Set Group Tags

This method fetches group conversations that have the specified tags.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let groupTags = ["tag1"];
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setGroupTags(groupTags)
      .build(); 
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      groupTags: Array<String> = ["tag1"],
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setGroupTags(groupTags)
        .build();
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects filtered by group tags:

  <span id="conv-grouptags-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                           |
  | --------------------- | ------ | ------------------------------ | ------------------------------------------------------ |
  | `conversationId`      | string | Unique conversation identifier | `"group_group_1748415903905"`                          |
  | `conversationType`    | string | Type of conversation           | `"group"`                                              |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                    |
  | `lastReadMessageId`   | string | ID of last read message        | `"25243"`                                              |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                    |
  | `latestMessageId`     | string | ID of latest message           | `"25243"`                                              |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-grouptags-lastmessage-object)      |
  | `conversationWith`    | object | Group details                  | [See below ↓](#conv-grouptags-conversationwith-object) |

  ***

  <span id="conv-grouptags-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                   |
  | ---------------- | ------- | --------------------------------- | ---------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25243"`                                      |
  | `conversationId` | string  | Conversation identifier           | `"group_group_1748415903905"`                  |
  | `receiverId`     | string  | Group's GUID                      | `"group_1748415903905"`                        |
  | `receiverType`   | string  | Type of receiver                  | `"group"`                                      |
  | `type`           | string  | Message type                      | `"text"`                                       |
  | `category`       | string  | Message category                  | `"message"`                                    |
  | `text`           | string  | Message text content              | `"Susan here "`                                |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771413931`                                   |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771413931`                                   |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-grouptags-sender-object)   |
  | `receiver`       | object  | Receiver group details            | [See below ↓](#conv-grouptags-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-grouptags-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-grouptags-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                           |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                           |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                        |

  ***

  <span id="conv-grouptags-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-4"`                                                     |
  | `name`          | string  | User's display name                    | `"Susan Marie"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-4.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"admin"`                                                               |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771413925`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-grouptags-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object (Group with tags):**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1748415903905"`       |
  | `name`               | string  | Group's display name            | `"3 People Group"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `tags`               | array   | Group tags                      | `["tag1"]`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1748415903905"` |
  | `owner`              | string  | Group owner's UID               | `"123456"`                    |
  | `scope`              | string  | Current user's scope in group   | `"admin"`                     |
  | `membersCount`       | number  | Total members in group          | `12`                          |
  | `onlineMembersCount` | number  | Online members count            | `3`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                       |
  | `joinedAt`           | number  | Timestamp when user joined      | `1748415973`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1748415957`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1771245340`                  |

  ***

  <span id="conv-grouptags-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (Group):**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1748415903905"`       |
  | `name`               | string  | Group's display name            | `"3 People Group"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1748415903905"` |
  | `owner`              | string  | Group owner's UID               | `"123456"`                    |
  | `scope`              | string  | Current user's scope in group   | `"admin"`                     |
  | `membersCount`       | number  | Total members in group          | `12`                          |
  | `onlineMembersCount` | number  | Online members count            | `1`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                       |
  | `joinedAt`           | number  | Timestamp when user joined      | `1748437105`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1748415957`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1771820149`                  |
  | `updatedBy`          | string  | UID of user who last updated    | `"cometchat-uid-2"`           |
</Accordion>

### With Tags

This method makes sure that the tags associated with the conversations are returned along with the other details of the conversations. The default value for this parameter is `false`.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .withTags(true)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .withTags(true)
        .build();
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects with conversation tags:

  <span id="conv-withtags-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                           | Sample Value                                          |
  | --------------------- | ------ | ------------------------------------- | ----------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier        | `"cometchat-uid-2_user_cometchat-uid-3"`              |
  | `conversationType`    | string | Type of conversation                  | `"user"`                                              |
  | `unreadMentionsCount` | number | Count of unread mentions              | `0`                                                   |
  | `lastReadMessageId`   | string | ID of last read message               | `"25276"`                                             |
  | `unreadMessageCount`  | number | Count of unread messages              | `0`                                                   |
  | `latestMessageId`     | string | ID of latest message                  | `"25276"`                                             |
  | `tags`                | array  | Conversation tags (added by withTags) | `["archivedChat"]`                                    |
  | `lastMessage`         | object | Last message in conversation          | [See below ↓](#conv-withtags-lastmessage-object)      |
  | `conversationWith`    | object | User details                          | [See below ↓](#conv-withtags-conversationwith-object) |

  ***

  <span id="conv-withtags-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                                  |
  | ---------------- | ------- | --------------------------------- | ------------------------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25276"`                                                     |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-2_user_cometchat-uid-3"`                      |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-2"`                                           |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                                      |
  | `type`           | string  | Message type                      | `"text"`                                                      |
  | `category`       | string  | Message category                  | `"message"`                                                   |
  | `text`           | string  | Message text content              | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771495242`                                                  |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771495244`                                                  |
  | `readAt`         | number  | Unix timestamp when read          | `1771495244`                                                  |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771495244`                                                  |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-withtags-sender-object)                   |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-withtags-receiver-object)                 |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-withtags-data-object)                     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-withtags-metadata-object)                 |
  | `reactions`      | array   | Message reactions                 | `[]`                                                          |
  | `mentionedUsers` | array   | Users mentioned in message        | [See below ↓](#conv-withtags-mentionedusers-array)            |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `true`                                                        |

  ***

  <span id="conv-withtags-mentionedusers-array" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.mentionedUsers` Array (per item):**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771738926`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |

  ***

  <span id="conv-withtags-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`          | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771495034`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-withtags-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771494233`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-withtags-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                   | Sample Value                                                  |
  | ---------- | ------ | ----------------------------- | ------------------------------------------------------------- |
  | `text`     | string | Message text                  | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `resource` | string | SDK resource identifier       | `"REACT_NATIVE-4_0_14-..."`                                   |
  | `mentions` | object | Map of mentioned users by UID | [See below ↓](#conv-withtags-data-mentions-object)            |
  | `entities` | object | Sender and receiver entities  | [See below ↓](#conv-withtags-data-entities-object)            |
  | `metadata` | object | Injected metadata             | [See below ↓](#conv-withtags-data-metadata-object)            |

  ***

  <span id="conv-withtags-data-mentions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.mentions` Object (keyed by UID):**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`         | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`       | string | URL to user's avatar     | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `lastActiveAt` | number | Last active timestamp    | `1771494233`                                                            |

  ***

  <span id="conv-withtags-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                                |
  | ---------- | ------ | ----------------------- | ----------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-withtags-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-withtags-data-entities-receiver-object) |

  ***

  <span id="conv-withtags-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                     |
  | ------------ | ------ | ------------------- | ---------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                         |
  | `entity`     | object | User entity details | [See below ↓](#conv-withtags-data-entities-sender-entity-object) |

  ***

  <span id="conv-withtags-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-3"`                                                     |
  | `name`         | string | User's display name      | `"Nancy Grace"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771495034`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-withtags-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                       |
  | ------------ | ------ | ------------------- | ------------------------------------------------------------------ |
  | `entityType` | string | Type of entity      | `"user"`                                                           |
  | `entity`     | object | User entity details | [See below ↓](#conv-withtags-data-entities-receiver-entity-object) |

  ***

  <span id="conv-withtags-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`           | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771494233`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
  | `tags`           | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-withtags-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                                |
  | ----------- | ------ | ------------------------ | ----------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-withtags-data-metadata-injected-object) |

  ***

  <span id="conv-withtags-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                  |
  | ------------ | ------ | --------------- | ------------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-withtags-data-metadata-extensions-object) |

  ***

  <span id="conv-withtags-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                   |
  | -------------- | ------ | ---------------------- | -------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-withtags-data-metadata-linkpreview-object) |

  ***

  <span id="conv-withtags-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-withtags-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                           |
  | ----------- | ------ | ------------------------ | ------------------------------------------------------ |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-withtags-metadata-injected-object) |

  ***

  <span id="conv-withtags-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                             |
  | ------------ | ------ | --------------- | -------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-withtags-metadata-extensions-object) |

  ***

  <span id="conv-withtags-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                              |
  | -------------- | ------ | ---------------------- | --------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-withtags-metadata-linkpreview-object) |

  ***

  <span id="conv-withtags-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-withtags-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`           | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`         | string  | User's online status                   | `"online"`                                                              |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771818451`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
</Accordion>

### Set Tags

This method helps you fetch the conversations based on the specified tags.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let tags = ["archivedChat"];
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setTags(tags)
      .build(); 
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      tags: Array<String> = ["archivedChat"],
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setTags(tags)
        .build();
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects filtered by conversation tags:

  <span id="conv-settags-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                         |
  | --------------------- | ------ | ------------------------------ | ---------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-2_user_cometchat-uid-3"`             |
  | `conversationType`    | string | Type of conversation           | `"user"`                                             |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                  |
  | `lastReadMessageId`   | string | ID of last read message        | `"25276"`                                            |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                  |
  | `latestMessageId`     | string | ID of latest message           | `"25276"`                                            |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-settags-lastmessage-object)      |
  | `conversationWith`    | object | User details                   | [See below ↓](#conv-settags-conversationwith-object) |

  ***

  <span id="conv-settags-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                                  |
  | ---------------- | ------- | --------------------------------- | ------------------------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25276"`                                                     |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-2_user_cometchat-uid-3"`                      |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-2"`                                           |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                                      |
  | `type`           | string  | Message type                      | `"text"`                                                      |
  | `category`       | string  | Message category                  | `"message"`                                                   |
  | `text`           | string  | Message text content              | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771495242`                                                  |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771495244`                                                  |
  | `readAt`         | number  | Unix timestamp when read          | `1771495244`                                                  |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771495244`                                                  |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-settags-sender-object)                    |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-settags-receiver-object)                  |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-settags-data-object)                      |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-settags-metadata-object)                  |
  | `reactions`      | array   | Message reactions                 | `[]`                                                          |
  | `mentionedUsers` | array   | Users mentioned in message        | [See below ↓](#conv-settags-mentionedusers-array)             |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `true`                                                        |

  ***

  <span id="conv-settags-mentionedusers-array" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.mentionedUsers` Array (per item):**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771738926`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |

  ***

  <span id="conv-settags-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`          | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771495034`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-settags-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771494233`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-settags-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                   | Sample Value                                                  |
  | ---------- | ------ | ----------------------------- | ------------------------------------------------------------- |
  | `text`     | string | Message text                  | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `resource` | string | SDK resource identifier       | `"REACT_NATIVE-4_0_14-..."`                                   |
  | `mentions` | object | Map of mentioned users by UID | [See below ↓](#conv-settags-data-mentions-object)             |
  | `entities` | object | Sender and receiver entities  | [See below ↓](#conv-settags-data-entities-object)             |
  | `metadata` | object | Injected metadata             | [See below ↓](#conv-settags-data-metadata-object)             |

  ***

  <span id="conv-settags-data-mentions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.mentions` Object (keyed by UID):**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`         | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`       | string | URL to user's avatar     | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `lastActiveAt` | number | Last active timestamp    | `1771494233`                                                            |

  ***

  <span id="conv-settags-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                               |
  | ---------- | ------ | ----------------------- | ---------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-settags-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-settags-data-entities-receiver-object) |

  ***

  <span id="conv-settags-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                    |
  | ------------ | ------ | ------------------- | --------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                        |
  | `entity`     | object | User entity details | [See below ↓](#conv-settags-data-entities-sender-entity-object) |

  ***

  <span id="conv-settags-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-3"`                                                     |
  | `name`         | string | User's display name      | `"Nancy Grace"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771495034`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-settags-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                      |
  | ------------ | ------ | ------------------- | ----------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                          |
  | `entity`     | object | User entity details | [See below ↓](#conv-settags-data-entities-receiver-entity-object) |

  ***

  <span id="conv-settags-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`           | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771494233`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
  | `tags`           | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-settags-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                               |
  | ----------- | ------ | ------------------------ | ---------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-settags-data-metadata-injected-object) |

  ***

  <span id="conv-settags-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                 |
  | ------------ | ------ | --------------- | ------------------------------------------------------------ |
  | `extensions` | object | Extensions data | [See below ↓](#conv-settags-data-metadata-extensions-object) |

  ***

  <span id="conv-settags-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                  |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-settags-data-metadata-linkpreview-object) |

  ***

  <span id="conv-settags-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-settags-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                          |
  | ----------- | ------ | ------------------------ | ----------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-settags-metadata-injected-object) |

  ***

  <span id="conv-settags-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                            |
  | ------------ | ------ | --------------- | ------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-settags-metadata-extensions-object) |

  ***

  <span id="conv-settags-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                             |
  | -------------- | ------ | ---------------------- | -------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-settags-metadata-linkpreview-object) |

  ***

  <span id="conv-settags-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-settags-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`           | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`         | string  | User's online status                   | `"online"`                                                              |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771818451`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
</Accordion>

<Note>
  **Blocked Users in Conversations - Quick Reference**

  | Flag                           | Effect                                                                                 |
  | ------------------------------ | -------------------------------------------------------------------------------------- |
  | `setIncludeBlockedUsers(true)` | Includes blocked user conversations in results (hidden by default)                     |
  | `setWithBlockedInfo(true)`     | Adds `blockedByMe`, `hasBlockedMe`, `blockedByMeAt`, `blockedAt` to `conversationWith` |

  **Usage:**

  * Use both together to see blocked conversations with accurate block status
  * `conversationWith` contains current block status
  * `lastMessage.sender`/`receiver` contains historical data from message time (may show `false` even if currently blocked)
</Note>

### Include Blocked Users

This method helps you fetch the conversations of users whom the logged-in user has blocked.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setIncludeBlockedUsers(true)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setIncludeBlockedUsers(true)
        .build();  
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects (includes conversations with blocked users):

  <span id="conv-blocked-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                         |
  | --------------------- | ------ | ------------------------------ | ---------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-2_user_cometchat-uid-3"`             |
  | `conversationType`    | string | Type of conversation           | `"user"`                                             |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                  |
  | `lastReadMessageId`   | string | ID of last read message        | `"25280"`                                            |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                  |
  | `latestMessageId`     | string | ID of latest message           | `"25276"`                                            |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-blocked-lastmessage-object)      |
  | `conversationWith`    | object | User details                   | [See below ↓](#conv-blocked-conversationwith-object) |

  ***

  <span id="conv-blocked-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                 |
  | ---------------- | ------- | --------------------------------- | -------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25280"`                                    |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-2_user_cometchat-uid-3"`     |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-2"`                          |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                     |
  | `type`           | string  | Message type                      | `"text"`                                     |
  | `category`       | string  | Message category                  | `"message"`                                  |
  | `text`           | string  | Message text content              | `"Hello Blocker"`                            |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771820699`                                 |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771820699`                                 |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-blocked-sender-object)   |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-blocked-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-blocked-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-blocked-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                         |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                         |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                      |

  ***

  <span id="conv-blocked-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                          |
  | ----------- | ------ | ------------------------ | ----------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-blocked-metadata-injected-object) |

  ***

  <span id="conv-blocked-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                            |
  | ------------ | ------ | --------------- | ------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-blocked-metadata-extensions-object) |

  ***

  <span id="conv-blocked-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                             |
  | -------------- | ------ | ---------------------- | -------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-blocked-metadata-linkpreview-object) |

  ***

  <span id="conv-blocked-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-blocked-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`          | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771818451`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-blocked-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771738926`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-blocked-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter    | Type   | Description                  | Sample Value                                      |
  | ------------ | ------ | ---------------------------- | ------------------------------------------------- |
  | `text`       | string | Message text                 | `"Hello Blocker"`                                 |
  | `resource`   | string | SDK resource identifier      | `"REACT_NATIVE-4_0_14-..."`                       |
  | `entities`   | object | Sender and receiver entities | [See below ↓](#conv-blocked-data-entities-object) |
  | `metadata`   | object | Injected metadata            | [See below ↓](#conv-blocked-data-metadata-object) |
  | `moderation` | object | Moderation status            | `{"status": "approved"}`                          |

  ***

  <span id="conv-blocked-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                               |
  | ----------- | ------ | ------------------------ | ---------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-blocked-data-metadata-injected-object) |

  ***

  <span id="conv-blocked-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                 |
  | ------------ | ------ | --------------- | ------------------------------------------------------------ |
  | `extensions` | object | Extensions data | [See below ↓](#conv-blocked-data-metadata-extensions-object) |

  ***

  <span id="conv-blocked-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                  |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-blocked-data-metadata-linkpreview-object) |

  ***

  <span id="conv-blocked-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-blocked-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                               |
  | ---------- | ------ | ----------------------- | ---------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-blocked-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-blocked-data-entities-receiver-object) |

  ***

  <span id="conv-blocked-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                    |
  | ------------ | ------ | ------------------- | --------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                        |
  | `entity`     | object | Sender user details | [See below ↓](#conv-blocked-data-entities-sender-entity-object) |

  ***

  <span id="conv-blocked-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-3"`                                                     |
  | `name`         | string | User's display name      | `"Nancy Grace"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771818451`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-blocked-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description                           | Sample Value                                                      |
  | ------------ | ------ | ------------------------------------- | ----------------------------------------------------------------- |
  | `entityType` | string | Type of entity                        | `"user"`                                                          |
  | `entity`     | object | Receiver user details with block info | [See below ↓](#conv-blocked-data-entities-receiver-entity-object) |

  ***

  <span id="conv-blocked-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type    | Description                           | Sample Value                                                            |
  | ---------------- | ------- | ------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier              | `"cometchat-uid-2"`                                                     |
  | `name`           | string  | User's display name                   | `"George Alan"`                                                         |
  | `avatar`         | string  | User's avatar URL                     | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `role`           | string  | User's role                           | `"default"`                                                             |
  | `status`         | string  | User's online status                  | `"offline"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                 | `1771738926`                                                            |
  | `tags`           | array   | User tags                             | `[]`                                                                    |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user | `false`                                                                 |
  | `hasBlockedMeAt` | number  | Timestamp when blocked by user        | `0`                                                                     |
  | `blockedAt`      | number  | Timestamp when blocked                | `0`                                                                     |
  | `conversationId` | string  | Conversation identifier               | `"cometchat-uid-2_user_cometchat-uid-3"`                                |

  ***

  <span id="conv-blocked-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`           | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`         | string  | User's online status                   | `"offline"`                                                             |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771738926`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
</Accordion>

### With Blocked Info

This method can be used to fetch the blocked information of the blocked user in the `ConversationWith` object.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setWithBlockedInfo(true)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setWithBlockedInfo(true)
      .build();     
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects with blocked info in `conversationWith`:

  <span id="conv-blockedinfo-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                             |
  | --------------------- | ------ | ------------------------------ | -------------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-2_user_cometchat-uid-3"`                 |
  | `conversationType`    | string | Type of conversation           | `"user"`                                                 |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                      |
  | `lastReadMessageId`   | string | ID of last read message        | `"25276"`                                                |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                      |
  | `latestMessageId`     | string | ID of latest message           | `"25276"`                                                |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-blockedinfo-lastmessage-object)      |
  | `conversationWith`    | object | User details with blocked info | [See below ↓](#conv-blockedinfo-conversationwith-object) |

  ***

  <span id="conv-blockedinfo-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                                  |
  | ---------------- | ------- | --------------------------------- | ------------------------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25276"`                                                     |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-2_user_cometchat-uid-3"`                      |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-2"`                                           |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                                      |
  | `type`           | string  | Message type                      | `"text"`                                                      |
  | `category`       | string  | Message category                  | `"message"`                                                   |
  | `text`           | string  | Message text content              | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771495242`                                                  |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771495244`                                                  |
  | `readAt`         | number  | Unix timestamp when read          | `1771495244`                                                  |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771495244`                                                  |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-blockedinfo-sender-object)                |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-blockedinfo-receiver-object)              |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-blockedinfo-data-object)                  |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-blockedinfo-metadata-object)              |
  | `reactions`      | array   | Message reactions                 | `[]`                                                          |
  | `mentionedUsers` | array   | Users mentioned in message        | [See below ↓](#conv-blockedinfo-mentionedusers-array)         |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `true`                                                        |

  ***

  <span id="conv-blockedinfo-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                              |
  | ----------- | ------ | ------------------------ | --------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-blockedinfo-metadata-injected-object) |

  ***

  <span id="conv-blockedinfo-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                |
  | ------------ | ------ | --------------- | ----------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-blockedinfo-metadata-extensions-object) |

  ***

  <span id="conv-blockedinfo-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                 |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------------ |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-blockedinfo-metadata-linkpreview-object) |

  ***

  <span id="conv-blockedinfo-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-blockedinfo-mentionedusers-array" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.mentionedUsers` Array (per item):**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771738926`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |

  ***

  <span id="conv-blockedinfo-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`          | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771495034`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-blockedinfo-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-2"`                                                     |
  | `name`          | string  | User's display name                    | `"George Alan"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771494233`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-blockedinfo-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                   | Sample Value                                                  |
  | ---------- | ------ | ----------------------------- | ------------------------------------------------------------- |
  | `text`     | string | Message text                  | `"Message for mentioned users, Hello <@uid:cometchat-uid-2>"` |
  | `resource` | string | SDK resource identifier       | `"REACT_NATIVE-4_0_14-..."`                                   |
  | `mentions` | object | Map of mentioned users by UID | [See below ↓](#conv-blockedinfo-data-mentions-object)         |
  | `entities` | object | Sender and receiver entities  | [See below ↓](#conv-blockedinfo-data-entities-object)         |
  | `metadata` | object | Injected metadata             | [See below ↓](#conv-blockedinfo-data-metadata-object)         |

  ***

  <span id="conv-blockedinfo-data-mentions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.mentions` Object (keyed by UID):**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`         | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`       | string | URL to user's avatar     | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `lastActiveAt` | number | Last active timestamp    | `1771494233`                                                            |

  ***

  <span id="conv-blockedinfo-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                                   |
  | ---------- | ------ | ----------------------- | -------------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-blockedinfo-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-blockedinfo-data-entities-receiver-object) |

  ***

  <span id="conv-blockedinfo-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                        |
  | ------------ | ------ | ------------------- | ------------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                            |
  | `entity`     | object | User entity details | [See below ↓](#conv-blockedinfo-data-entities-sender-entity-object) |

  ***

  <span id="conv-blockedinfo-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-3"`                                                     |
  | `name`         | string | User's display name      | `"Nancy Grace"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771495034`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-blockedinfo-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                          |
  | ------------ | ------ | ------------------- | --------------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                              |
  | `entity`     | object | User entity details | [See below ↓](#conv-blockedinfo-data-entities-receiver-entity-object) |

  ***

  <span id="conv-blockedinfo-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-2"`                                                     |
  | `name`           | string | User's display name      | `"George Alan"`                                                         |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771494233`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
  | `tags`           | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-blockedinfo-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                                   |
  | ----------- | ------ | ------------------------ | -------------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-blockedinfo-data-metadata-injected-object) |

  ***

  <span id="conv-blockedinfo-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                     |
  | ------------ | ------ | --------------- | ---------------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-blockedinfo-data-metadata-extensions-object) |

  ***

  <span id="conv-blockedinfo-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                      |
  | -------------- | ------ | ---------------------- | ----------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-blockedinfo-data-metadata-linkpreview-object) |

  ***

  <span id="conv-blockedinfo-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-blockedinfo-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User with blocked info):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`           | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`         | string  | User's online status                   | `"online"`                                                              |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771818451`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `true`                                                                  |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `blockedByMeAt`  | number  | Timestamp when blocked by current user | `1771820668`                                                            |
  | `blockedAt`      | number  | Block timestamp                        | `1771820668`                                                            |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-2_user_cometchat-uid-3"`                                |
</Accordion>

### Search Conversations

This method helps you search for a conversation based on a User or Group name.

<Note>
  This feature is only available with `Conversation & Advanced Search`. The `Conversation & Advanced Search` is only available in `Advanced` & `Custom` [plans](https://www.cometchat.com/pricing). If you're already on one of these plans, please enable the `Conversation & Advanced Search` from [CometChat Dashboard](https://app.cometchat.com) (Open your app, navigate to Chats -> Settings -> General Configuration)
</Note>

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setSearchKeyword("Hiking")
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setSearchKeyword("Hiking")
        .build();  
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects matching the search keyword:

  <span id="conv-search-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                        |
  | --------------------- | ------ | ------------------------------ | --------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"group_cometchat-guid-1"`                          |
  | `conversationType`    | string | Type of conversation           | `"group"`                                           |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                 |
  | `lastReadMessageId`   | string | ID of last read message        | `"4791"`                                            |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                 |
  | `latestMessageId`     | string | ID of latest message           | `"4791"`                                            |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-search-lastmessage-object)      |
  | `conversationWith`    | object | Group details                  | [See below ↓](#conv-search-conversationwith-object) |

  ***

  <span id="conv-search-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object (Action Message):**

  | Parameter        | Type    | Description                       | Sample Value                                 |
  | ---------------- | ------- | --------------------------------- | -------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"4791"`                                     |
  | `conversationId` | string  | Conversation identifier           | `"group_cometchat-guid-1"`                   |
  | `receiverId`     | string  | Group's GUID                      | `"cometchat-guid-1"`                         |
  | `receiverType`   | string  | Type of receiver                  | `"group"`                                    |
  | `type`           | string  | Message type                      | `"groupMember"`                              |
  | `category`       | string  | Message category                  | `"action"`                                   |
  | `action`         | string  | Action performed                  | `"kicked"`                                   |
  | `message`        | string  | Action message text               | `"John Paul kicked Andrew Joseph"`           |
  | `sentAt`         | number  | Unix timestamp when sent          | `1753946954`                                 |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1764150385`                                 |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1764150385`                                 |
  | `actionBy`       | object  | User who performed action         | [See below ↓](#conv-search-actionby-object)  |
  | `actionFor`      | object  | Group the action was for          | [See below ↓](#conv-search-actionfor-object) |
  | `actionOn`       | object  | User the action was on            | [See below ↓](#conv-search-actionon-object)  |
  | `sender`         | object  | Sender user details               | Same as `actionBy`                           |
  | `receiver`       | object  | Receiver group details            | Same as `actionFor`                          |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-search-data-object)      |
  | `reactions`      | array   | Message reactions                 | `[]`                                         |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                         |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                      |

  ***

  <span id="conv-search-actionby-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.actionBy` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-5"`                                                     |
  | `name`          | string  | User's display name                    | `"John Paul"`                                                           |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp"` |
  | `status`        | string  | User's online status                   | `"offline"`                                                             |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1753945410`                                                            |
  | `createdAt`     | number  | User creation timestamp                | `1746375164`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |

  ***

  <span id="conv-search-actionfor-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.actionFor` Object (Group):**

  | Parameter        | Type    | Description                     | Sample Value                                                              |
  | ---------------- | ------- | ------------------------------- | ------------------------------------------------------------------------- |
  | `guid`           | string  | Group's unique identifier       | `"cometchat-guid-1"`                                                      |
  | `name`           | string  | Group's display name            | `"Hiking Group"`                                                          |
  | `type`           | string  | Group type                      | `"private"`                                                               |
  | `description`    | string  | Group description               | `"Explore, connect, and chat with fellow outdoor enthusiasts..."`         |
  | `icon`           | string  | URL to group icon               | `"https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp"` |
  | `conversationId` | string  | Conversation identifier         | `"group_cometchat-guid-1"`                                                |
  | `owner`          | string  | Group owner's UID               | `"cometchat-uid-5"`                                                       |
  | `membersCount`   | number  | Total members in group          | `3`                                                                       |
  | `hasJoined`      | boolean | Whether current user has joined | `false`                                                                   |
  | `isBanned`       | boolean | Whether current user is banned  | `false`                                                                   |
  | `createdAt`      | number  | Group creation timestamp        | `1746375164`                                                              |
  | `updatedAt`      | number  | Group update timestamp          | `1753945144`                                                              |

  ***

  <span id="conv-search-actionon-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.actionOn` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-1"`                                                     |
  | `name`           | string  | User's display name                    | `"Andrew Joseph"`                                                       |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp"` |
  | `status`         | string  | User's online status                   | `"offline"`                                                             |
  | `statusMessage`  | string  | User's status message                  | `"Hey there I'm using CometChat"`                                       |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1753944766`                                                            |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-1_user_cometchat-uid-5"`                                |
  | `createdAt`      | number  | User creation timestamp                | `1746375164`                                                            |
  | `updatedAt`      | number  | User update timestamp                  | `1749731589`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |

  ***

  <span id="conv-search-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description     | Sample Value                                     |
  | ---------- | ------ | --------------- | ------------------------------------------------ |
  | `action`   | string | Action type     | `"kicked"`                                       |
  | `entities` | object | Action entities | [See below ↓](#conv-search-data-entities-object) |

  ***

  <span id="conv-search-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter | Type   | Description               | Sample Value                                         |
  | --------- | ------ | ------------------------- | ---------------------------------------------------- |
  | `by`      | object | User who performed action | [See below ↓](#conv-search-data-entities-by-object)  |
  | `for`     | object | Group the action was for  | [See below ↓](#conv-search-data-entities-for-object) |
  | `on`      | object | User the action was on    | [See below ↓](#conv-search-data-entities-on-object)  |

  ***

  <span id="conv-search-data-entities-by-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.by` Object:**

  | Parameter    | Type   | Description         | Sample Value                                               |
  | ------------ | ------ | ------------------- | ---------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                   |
  | `entity`     | object | User entity details | [See below ↓](#conv-search-data-entities-by-entity-object) |

  ***

  <span id="conv-search-data-entities-by-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.by.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-5"`                                                     |
  | `name`         | string | User's display name      | `"John Paul"`                                                           |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-5.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"offline"`                                                             |
  | `lastActiveAt` | number | Last active timestamp    | `1753945410`                                                            |
  | `createdAt`    | number | User creation timestamp  | `1746375164`                                                            |

  ***

  <span id="conv-search-data-entities-for-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.for` Object:**

  | Parameter    | Type   | Description          | Sample Value                                                |
  | ------------ | ------ | -------------------- | ----------------------------------------------------------- |
  | `entityType` | string | Type of entity       | `"group"`                                                   |
  | `entity`     | object | Group entity details | [See below ↓](#conv-search-data-entities-for-entity-object) |

  ***

  <span id="conv-search-data-entities-for-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.for.entity` Object:**

  | Parameter        | Type    | Description                     | Sample Value                                                              |
  | ---------------- | ------- | ------------------------------- | ------------------------------------------------------------------------- |
  | `guid`           | string  | Group's unique identifier       | `"cometchat-guid-1"`                                                      |
  | `name`           | string  | Group's display name            | `"Hiking Group"`                                                          |
  | `type`           | string  | Group type                      | `"private"`                                                               |
  | `description`    | string  | Group description               | `"Explore, connect, and chat with fellow outdoor enthusiasts..."`         |
  | `icon`           | string  | URL to group icon               | `"https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp"` |
  | `conversationId` | string  | Conversation identifier         | `"group_cometchat-guid-1"`                                                |
  | `owner`          | string  | Group owner's UID               | `"cometchat-uid-5"`                                                       |
  | `membersCount`   | number  | Total members in group          | `3`                                                                       |
  | `hasJoined`      | boolean | Whether current user has joined | `false`                                                                   |
  | `isBanned`       | boolean | Whether current user is banned  | `false`                                                                   |
  | `createdAt`      | number  | Group creation timestamp        | `1746375164`                                                              |
  | `updatedAt`      | number  | Group update timestamp          | `1753945144`                                                              |

  ***

  <span id="conv-search-data-entities-on-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.on` Object:**

  | Parameter    | Type   | Description         | Sample Value                                               |
  | ------------ | ------ | ------------------- | ---------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                   |
  | `entity`     | object | User entity details | [See below ↓](#conv-search-data-entities-on-entity-object) |

  ***

  <span id="conv-search-data-entities-on-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.on.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-1"`                                                     |
  | `name`           | string | User's display name      | `"Andrew Joseph"`                                                       |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-1.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"offline"`                                                             |
  | `statusMessage`  | string | User's status message    | `"Hey there I'm using CometChat"`                                       |
  | `lastActiveAt`   | number | Last active timestamp    | `1753944766`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-1_user_cometchat-uid-5"`                                |
  | `createdAt`      | number | User creation timestamp  | `1746375164`                                                            |
  | `updatedAt`      | number | User update timestamp    | `1749731589`                                                            |

  ***

  <span id="conv-search-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (Group):**

  | Parameter            | Type    | Description                     | Sample Value                                                              |
  | -------------------- | ------- | ------------------------------- | ------------------------------------------------------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"cometchat-guid-1"`                                                      |
  | `name`               | string  | Group's display name            | `"Hiking Group"`                                                          |
  | `type`               | string  | Group type                      | `"private"`                                                               |
  | `description`        | string  | Group description               | `"Explore, connect, and chat with fellow outdoor enthusiasts..."`         |
  | `icon`               | string  | URL to group icon               | `"https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp"` |
  | `conversationId`     | string  | Conversation identifier         | `"group_cometchat-guid-1"`                                                |
  | `owner`              | string  | Group owner's UID               | `"cometchat-uid-5"`                                                       |
  | `scope`              | string  | Current user's scope in group   | `"participant"`                                                           |
  | `membersCount`       | number  | Total members in group          | `3`                                                                       |
  | `onlineMembersCount` | number  | Online members count            | `1`                                                                       |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                                                                    |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                                                                   |
  | `joinedAt`           | number  | Timestamp when user joined      | `1746375164`                                                              |
  | `createdAt`          | number  | Group creation timestamp        | `1746375164`                                                              |
  | `updatedAt`          | number  | Group update timestamp          | `1753946955`                                                              |
</Accordion>

### Unread Conversations

This method helps you fetch unread conversations.

<Note>
  This feature is only available with `Conversation & Advanced Search`. The `Conversation & Advanced Search` is only available in `Advanced` & `Custom` [plans](https://www.cometchat.com/pricing). If you're already on one of these plans, please enable the `Conversation & Advanced Search` from [CometChat Dashboard](https://app.cometchat.com) (Open your app, navigate to Chats -> Settings -> General Configuration)
</Note>

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .setUnread(true)
      .build();
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .setUnread(true)
        .build();  
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `fetchNext()` returns an array of `Conversation` objects with unread messages:

  <span id="conv-unread-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object (per item in array):**

  | Parameter             | Type   | Description                    | Sample Value                                        |
  | --------------------- | ------ | ------------------------------ | --------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"group_group_1762515421478"`                       |
  | `conversationType`    | string | Type of conversation           | `"group"`                                           |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                 |
  | `lastReadMessageId`   | string | ID of last read message        | `"24359"`                                           |
  | `unreadMessageCount`  | number | Count of unread messages       | `2`                                                 |
  | `latestMessageId`     | string | ID of latest message           | `"25236"`                                           |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-unread-lastmessage-object)      |
  | `conversationWith`    | object | Group details                  | [See below ↓](#conv-unread-conversationwith-object) |

  ***

  <span id="conv-unread-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                |
  | ---------------- | ------- | --------------------------------- | ------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25236"`                                   |
  | `conversationId` | string  | Conversation identifier           | `"group_group_1762515421478"`               |
  | `receiverId`     | string  | Group's GUID                      | `"group_1762515421478"`                     |
  | `receiverType`   | string  | Type of receiver                  | `"group"`                                   |
  | `type`           | string  | Message type                      | `"text"`                                    |
  | `category`       | string  | Message category                  | `"message"`                                 |
  | `text`           | string  | Message text content              | `"Hru"`                                     |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771400675`                                |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771400675`                                |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-unread-sender-object)   |
  | `receiver`       | object  | Receiver group details            | [See below ↓](#conv-unread-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-unread-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-unread-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                        |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                        |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                     |

  ***

  <span id="conv-unread-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                         |
  | ----------- | ------ | ------------------------ | ---------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-unread-metadata-injected-object) |

  ***

  <span id="conv-unread-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                           |
  | ------------ | ------ | --------------- | ------------------------------------------------------ |
  | `extensions` | object | Extensions data | [See below ↓](#conv-unread-metadata-extensions-object) |

  ***

  <span id="conv-unread-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                            |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-unread-metadata-linkpreview-object) |

  ***

  <span id="conv-unread-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-unread-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-3"`                                                     |
  | `name`          | string  | User's display name                    | `"Nancy Grace"`                                                         |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771397739`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-unread-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object (Group):**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1762515421478"`       |
  | `name`               | string  | Group's display name            | `"TwoMemberGroup"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1762515421478"` |
  | `owner`              | string  | Group owner's UID               | `"cometchat-uid-2"`           |
  | `scope`              | string  | Current user's scope in group   | `"participant"`               |
  | `membersCount`       | number  | Total members in group          | `3`                           |
  | `onlineMembersCount` | number  | Online members count            | `2`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                       |
  | `joinedAt`           | number  | Timestamp when user joined      | `1762515534`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1762515421`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1768888876`                  |

  ***

  <span id="conv-unread-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                  | Sample Value                                     |
  | ---------- | ------ | ---------------------------- | ------------------------------------------------ |
  | `text`     | string | Message text                 | `"Hru"`                                          |
  | `resource` | string | SDK resource identifier      | `"REACT_NATIVE-4_0_14-..."`                      |
  | `entities` | object | Sender and receiver entities | [See below ↓](#conv-unread-data-entities-object) |
  | `metadata` | object | Injected metadata            | [See below ↓](#conv-unread-data-metadata-object) |

  ***

  <span id="conv-unread-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                              |
  | ----------- | ------ | ------------------------ | --------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-unread-data-metadata-injected-object) |

  ***

  <span id="conv-unread-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                |
  | ------------ | ------ | --------------- | ----------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-unread-data-metadata-extensions-object) |

  ***

  <span id="conv-unread-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                 |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------------ |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-unread-data-metadata-linkpreview-object) |

  ***

  <span id="conv-unread-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-unread-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                              |
  | ---------- | ------ | ----------------------- | --------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-unread-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-unread-data-entities-receiver-object) |

  ***

  <span id="conv-unread-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                   |
  | ------------ | ------ | ------------------- | -------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                       |
  | `entity`     | object | User entity details | [See below ↓](#conv-unread-data-entities-sender-entity-object) |

  ***

  <span id="conv-unread-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-3"`                                                     |
  | `name`         | string | User's display name      | `"Nancy Grace"`                                                         |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-3.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771397739`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-unread-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description          | Sample Value                                                     |
  | ------------ | ------ | -------------------- | ---------------------------------------------------------------- |
  | `entityType` | string | Type of entity       | `"group"`                                                        |
  | `entity`     | object | Group entity details | [See below ↓](#conv-unread-data-entities-receiver-entity-object) |

  ***

  <span id="conv-unread-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1762515421478"`       |
  | `name`               | string  | Group's display name            | `"TwoMemberGroup"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1762515421478"` |
  | `owner`              | string  | Group owner's UID               | `"cometchat-uid-2"`           |
  | `scope`              | string  | Current user's scope in group   | `"participant"`               |
  | `membersCount`       | number  | Total members in group          | `3`                           |
  | `onlineMembersCount` | number  | Online members count            | `2`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `joinedAt`           | number  | Timestamp when user joined      | `1762515534`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1762515421`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1768888876`                  |

  ***

  <span id="conv-unread-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (Group):**

  | Parameter            | Type    | Description                     | Sample Value                  |
  | -------------------- | ------- | ------------------------------- | ----------------------------- |
  | `guid`               | string  | Group's unique identifier       | `"group_1762515421478"`       |
  | `name`               | string  | Group's display name            | `"TwoMemberGroup"`            |
  | `type`               | string  | Group type                      | `"public"`                    |
  | `conversationId`     | string  | Conversation identifier         | `"group_group_1762515421478"` |
  | `owner`              | string  | Group owner's UID               | `"cometchat-uid-2"`           |
  | `scope`              | string  | Current user's scope in group   | `"admin"`                     |
  | `membersCount`       | number  | Total members in group          | `3`                           |
  | `onlineMembersCount` | number  | Online members count            | `1`                           |
  | `hasJoined`          | boolean | Whether current user has joined | `true`                        |
  | `isBanned`           | boolean | Whether current user is banned  | `false`                       |
  | `joinedAt`           | number  | Timestamp when user joined      | `1762515421`                  |
  | `createdAt`          | number  | Group creation timestamp        | `1762515421`                  |
  | `updatedAt`          | number  | Group update timestamp          | `1768888876`                  |
</Accordion>

Finally, once all the parameters are set to the builder class, you need to call the `build()` method to get the object of the `ConversationsRequest` class.

Once you have the object of the `ConversationsRequest` class, you need to call the `fetchNext()` method. Calling this method will return a list of `Conversation` objects containing X number of users depending on the limit set.

A Maximum of only 50 Conversations can be fetched at once.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let limit = 30;
    let conversationsRequest = new CometChat.ConversationsRequestBuilder()
      .setLimit(limit)
      .build();

    conversationsRequest.fetchNext().then(
      conversationList => {
        console.log("Conversations list received:", conversationList);
      }, error => {
        console.log("Conversations list fetching failed with error:", error);
      }
    );
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    let limit: number = 30,
      conversationsRequest: CometChat.ConversationsRequest = new CometChat.ConversationsRequestBuilder()
        .setLimit(limit)
        .build();

    conversationsRequest.fetchNext().then(
      (conversationList: CometChat.Conversation[]) => {
        console.log("Conversations list received:", conversationList);
      }, (error: CometChat.CometChatException) => {
        console.log("Conversations list fetching failed with error:", error);
      }
    );
    ```
  </Tab>
</Tabs>

The `Conversation` Object consists of the following fields:

| Field              | Information                                                       |
| ------------------ | ----------------------------------------------------------------- |
| conversationId     | ID of the conversation.                                           |
| conversationType   | Type of conversation. (user/group)                                |
| lastMessage        | Last message in the conversation.                                 |
| conversationWith   | User or Group object containing the details of the user or group. |
| unreadMessageCount | Unread message count for the conversation.                        |

## Tag Conversation

*In other words, as a logged-in user, how do I tag a conversation?*

To tag a specific conversation, you can use the `tagConversation()` method. The `tagConversation()` method accepts three parameters.

1. `conversationWith`: UID/GUID of the user/group whose conversation you want to tag.

2. `conversationType`: The `conversationType` variable can hold one of the below two values:

   1. user - Only fetches user conversation.
   2. group - Only fetches group conversations.

3. `tags`: The `tags` variable will be a list of tags you want to add to a conversation.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    let tags = ["archivedChat"];
    CometChat.tagConversation('conversationWith', 'conversationType', tags).then(
      conversation => {
        console.log('conversation', conversation);
      }, error => {
        console.log('error while fetching a conversation', error);
      }
    );
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `tagConversation()` returns the updated `Conversation` object with the new tags:

  <span id="conv-tag-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object:**

  | Parameter             | Type   | Description                    | Sample Value                                     |
  | --------------------- | ------ | ------------------------------ | ------------------------------------------------ |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-6_user_cometchat-uid-7"`         |
  | `conversationType`    | string | Type of conversation           | `"user"`                                         |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                              |
  | `lastReadMessageId`   | string | ID of last read message        | `"25291"`                                        |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                              |
  | `latestMessageId`     | string | ID of latest message           | `"25291"`                                        |
  | `tags`                | array  | Conversation tags              | `["archivedChat"]`                               |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-tag-lastmessage-object)      |
  | `conversationWith`    | object | User details                   | [See below ↓](#conv-tag-conversationwith-object) |

  ***

  <span id="conv-tag-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                             |
  | ---------------- | ------- | --------------------------------- | ---------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25291"`                                |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-6_user_cometchat-uid-7"` |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-6"`                      |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                 |
  | `type`           | string  | Message type                      | `"text"`                                 |
  | `category`       | string  | Message category                  | `"message"`                              |
  | `text`           | string  | Message text content              | `"Hello"`                                |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771831336`                             |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771832977`                             |
  | `readAt`         | number  | Unix timestamp when read          | `1771832977`                             |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771832977`                             |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-tag-sender-object)   |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-tag-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-tag-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-tag-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                     |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                     |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                  |

  ***

  <span id="conv-tag-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                      |
  | ----------- | ------ | ------------------------ | ------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-tag-metadata-injected-object) |

  ***

  <span id="conv-tag-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                        |
  | ------------ | ------ | --------------- | --------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-tag-metadata-extensions-object) |

  ***

  <span id="conv-tag-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                         |
  | -------------- | ------ | ---------------------- | ---------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-tag-metadata-linkpreview-object) |

  ***

  <span id="conv-tag-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-tag-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-7"`                                                     |
  | `name`          | string  | User's display name                    | `"Henry Marino"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829868`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-tag-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-6"`                                                     |
  | `name`          | string  | User's display name                    | `"Ronald Jerry"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-6.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829859`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-tag-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                  | Sample Value                                  |
  | ---------- | ------ | ---------------------------- | --------------------------------------------- |
  | `text`     | string | Message text                 | `"Hello"`                                     |
  | `resource` | string | SDK resource identifier      | `"REACT_NATIVE-4_0_14-..."`                   |
  | `entities` | object | Sender and receiver entities | [See below ↓](#conv-tag-data-entities-object) |
  | `metadata` | object | Injected metadata            | [See below ↓](#conv-tag-data-metadata-object) |

  ***

  <span id="conv-tag-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                           |
  | ----------- | ------ | ------------------------ | ------------------------------------------------------ |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-tag-data-metadata-injected-object) |

  ***

  <span id="conv-tag-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                             |
  | ------------ | ------ | --------------- | -------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-tag-data-metadata-extensions-object) |

  ***

  <span id="conv-tag-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                              |
  | -------------- | ------ | ---------------------- | --------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-tag-data-metadata-linkpreview-object) |

  ***

  <span id="conv-tag-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-tag-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                           |
  | ---------- | ------ | ----------------------- | ------------------------------------------------------ |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-tag-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-tag-data-entities-receiver-object) |

  ***

  <span id="conv-tag-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                |
  | ------------ | ------ | ------------------- | ----------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                    |
  | `entity`     | object | User entity details | [See below ↓](#conv-tag-data-entities-sender-entity-object) |

  ***

  <span id="conv-tag-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-7"`                                                     |
  | `name`         | string | User's display name      | `"Henry Marino"`                                                        |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771829868`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-tag-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                  |
  | ------------ | ------ | ------------------- | ------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                      |
  | `entity`     | object | User entity details | [See below ↓](#conv-tag-data-entities-receiver-entity-object) |

  ***

  <span id="conv-tag-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-6"`                                                     |
  | `name`           | string | User's display name      | `"Ronald Jerry"`                                                        |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-6.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771829859`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-6_user_cometchat-uid-7"`                                |
  | `tags`           | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-tag-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-7"`                                                     |
  | `name`           | string  | User's display name                    | `"Henry Marino"`                                                        |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `status`         | string  | User's online status                   | `"online"`                                                              |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771834604`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-6_user_cometchat-uid-7"`                                |
</Accordion>

<Note>
  The tags for conversations are one-way. This means that if user A tags a conversation with user B, that tag will be applied to that conversation only for user A.
</Note>

## Retrieve Single Conversation

*In other words, as a logged-in user, how do I retrieve a specific conversation?*

To fetch a specific conversation, you can use the `getConversation` method. The `getConversation` method accepts two parameters.

1. `conversationWith`: UID/GUID of the user/group whose conversation you want to fetch.
2. `conversationType`: The `conversationType` variable can hold one of the below two values:

* user - Only fetches user conversation.
* group - Only fetches group conversations.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    CometChat.getConversation('conversationWith', 'conversationType').then(
      conversation => {
        console.log('conversation', conversation);
      }, error => {
        console.log('error while fetching a conversation', error);
      }
    );  
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `getConversation()` returns the `Conversation` object:

  <span id="conv-single-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object:**

  | Parameter             | Type   | Description                    | Sample Value                                        |
  | --------------------- | ------ | ------------------------------ | --------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier | `"cometchat-uid-6_user_cometchat-uid-7"`            |
  | `conversationType`    | string | Type of conversation           | `"user"`                                            |
  | `unreadMentionsCount` | number | Count of unread mentions       | `0`                                                 |
  | `lastReadMessageId`   | string | ID of last read message        | `"25291"`                                           |
  | `unreadMessageCount`  | number | Count of unread messages       | `0`                                                 |
  | `latestMessageId`     | string | ID of latest message           | `"25291"`                                           |
  | `tags`                | array  | Conversation tags              | `["archivedChat"]`                                  |
  | `lastMessage`         | object | Last message in conversation   | [See below ↓](#conv-single-lastmessage-object)      |
  | `conversationWith`    | object | User details                   | [See below ↓](#conv-single-conversationwith-object) |

  ***

  <span id="conv-single-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                |
  | ---------------- | ------- | --------------------------------- | ------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25291"`                                   |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-6_user_cometchat-uid-7"`    |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-6"`                         |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                    |
  | `type`           | string  | Message type                      | `"text"`                                    |
  | `category`       | string  | Message category                  | `"message"`                                 |
  | `text`           | string  | Message text content              | `"Hello"`                                   |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771831336`                                |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771832977`                                |
  | `readAt`         | number  | Unix timestamp when read          | `1771832977`                                |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771832977`                                |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-single-sender-object)   |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-single-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-single-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-single-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                        |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                        |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                     |

  ***

  <span id="conv-single-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                         |
  | ----------- | ------ | ------------------------ | ---------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-single-metadata-injected-object) |

  ***

  <span id="conv-single-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                           |
  | ------------ | ------ | --------------- | ------------------------------------------------------ |
  | `extensions` | object | Extensions data | [See below ↓](#conv-single-metadata-extensions-object) |

  ***

  <span id="conv-single-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                            |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-single-metadata-linkpreview-object) |

  ***

  <span id="conv-single-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-single-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-7"`                                                     |
  | `name`          | string  | User's display name                    | `"Henry Marino"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829868`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-single-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-6"`                                                     |
  | `name`          | string  | User's display name                    | `"Ronald Jerry"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-6.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829859`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-single-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                  | Sample Value                                     |
  | ---------- | ------ | ---------------------------- | ------------------------------------------------ |
  | `text`     | string | Message text                 | `"Hello"`                                        |
  | `resource` | string | SDK resource identifier      | `"REACT_NATIVE-4_0_14-..."`                      |
  | `entities` | object | Sender and receiver entities | [See below ↓](#conv-single-data-entities-object) |
  | `metadata` | object | Injected metadata            | [See below ↓](#conv-single-data-metadata-object) |

  ***

  <span id="conv-single-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                              |
  | ----------- | ------ | ------------------------ | --------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-single-data-metadata-injected-object) |

  ***

  <span id="conv-single-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                |
  | ------------ | ------ | --------------- | ----------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-single-data-metadata-extensions-object) |

  ***

  <span id="conv-single-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                 |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------------ |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-single-data-metadata-linkpreview-object) |

  ***

  <span id="conv-single-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-single-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                              |
  | ---------- | ------ | ----------------------- | --------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-single-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-single-data-entities-receiver-object) |

  ***

  <span id="conv-single-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                   |
  | ------------ | ------ | ------------------- | -------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                       |
  | `entity`     | object | User entity details | [See below ↓](#conv-single-data-entities-sender-entity-object) |

  ***

  <span id="conv-single-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-7"`                                                     |
  | `name`         | string | User's display name      | `"Henry Marino"`                                                        |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771829868`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-single-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                     |
  | ------------ | ------ | ------------------- | ---------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                         |
  | `entity`     | object | User entity details | [See below ↓](#conv-single-data-entities-receiver-entity-object) |

  ***

  <span id="conv-single-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-6"`                                                     |
  | `name`           | string | User's display name      | `"Ronald Jerry"`                                                        |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-6.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771829859`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-6_user_cometchat-uid-7"`                                |
  | `tags`           | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-single-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter        | Type    | Description                            | Sample Value                                                            |
  | ---------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`            | string  | User's unique identifier               | `"cometchat-uid-7"`                                                     |
  | `name`           | string  | User's display name                    | `"Henry Marino"`                                                        |
  | `avatar`         | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `status`         | string  | User's online status                   | `"online"`                                                              |
  | `role`           | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`   | number  | Last active timestamp                  | `1771834604`                                                            |
  | `hasBlockedMe`   | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`    | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt`  | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`           | array   | User tags                              | `[]`                                                                    |
  | `conversationId` | string  | Conversation identifier                | `"cometchat-uid-6_user_cometchat-uid-7"`                                |
</Accordion>

## Convert Messages to Conversations

As per our [receive messages](/sdk/react-native/receive-messages) guide, for real-time messages, you will always receive `Message` objects and not `Conversation` objects. Thus, you will need a mechanism to convert the Message object to a `Conversation` object. You can use the `getConversationFromMessage(BaseMessage message)` method of the `CometChatHelper` class.

<Tabs>
  <Tab title="JavaScript">
    ```javascript theme={null}
    CometChat.CometChatHelper.getConversationFromMessage(message).then(
    conversation => {
      console.log("Conversation Object", conversation);
    }, error => {
      console.log("Error while converting message object", error);
    }
    );
    ```
  </Tab>
</Tabs>

<Accordion title="Response">
  **On Success** — `getConversationFromMessage()` returns the converted `Conversation` object:

  <span id="conv-convert-conversation-object" style={{scrollMarginTop: '100px'}} />

  **Conversation Object:**

  | Parameter             | Type   | Description                                    | Sample Value                                         |
  | --------------------- | ------ | ---------------------------------------------- | ---------------------------------------------------- |
  | `conversationId`      | string | Unique conversation identifier                 | `"cometchat-uid-6_user_cometchat-uid-7"`             |
  | `conversationType`    | string | Type of conversation                           | `"user"`                                             |
  | `unreadMentionsCount` | number | Count of unread mentions                       | `0`                                                  |
  | `lastReadMessageId`   | string | ID of last read message (empty when converted) | `""`                                                 |
  | `unreadMessageCount`  | number | Count of unread messages (0 when converted)    | `0`                                                  |
  | `latestMessageId`     | string | ID of latest message (empty when converted)    | `""`                                                 |
  | `lastMessage`         | object | The source message converted to lastMessage    | [See below ↓](#conv-convert-lastmessage-object)      |
  | `conversationWith`    | object | User details from message receiver             | [See below ↓](#conv-convert-conversationwith-object) |

  ***

  <span id="conv-convert-lastmessage-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage` Object:**

  | Parameter        | Type    | Description                       | Sample Value                                 |
  | ---------------- | ------- | --------------------------------- | -------------------------------------------- |
  | `id`             | string  | Unique message identifier         | `"25291"`                                    |
  | `conversationId` | string  | Conversation identifier           | `"cometchat-uid-6_user_cometchat-uid-7"`     |
  | `receiverId`     | string  | Receiver's UID                    | `"cometchat-uid-6"`                          |
  | `receiverType`   | string  | Type of receiver                  | `"user"`                                     |
  | `type`           | string  | Message type                      | `"text"`                                     |
  | `category`       | string  | Message category                  | `"message"`                                  |
  | `text`           | string  | Message text content              | `"Hello"`                                    |
  | `sentAt`         | number  | Unix timestamp when sent          | `1771831336`                                 |
  | `deliveredAt`    | number  | Unix timestamp when delivered     | `1771832977`                                 |
  | `readAt`         | number  | Unix timestamp when read          | `1771832977`                                 |
  | `updatedAt`      | number  | Unix timestamp when updated       | `1771832977`                                 |
  | `sender`         | object  | Sender user details               | [See below ↓](#conv-convert-sender-object)   |
  | `receiver`       | object  | Receiver user details             | [See below ↓](#conv-convert-receiver-object) |
  | `data`           | object  | Additional message data           | [See below ↓](#conv-convert-data-object)     |
  | `metadata`       | object  | Message metadata                  | [See below ↓](#conv-convert-metadata-object) |
  | `reactions`      | array   | Message reactions                 | `[]`                                         |
  | `mentionedUsers` | array   | Users mentioned in message        | `[]`                                         |
  | `mentionedMe`    | boolean | Whether current user is mentioned | `false`                                      |

  ***

  <span id="conv-convert-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                          |
  | ----------- | ------ | ------------------------ | ----------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-convert-metadata-injected-object) |

  ***

  <span id="conv-convert-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                            |
  | ------------ | ------ | --------------- | ------------------------------------------------------- |
  | `extensions` | object | Extensions data | [See below ↓](#conv-convert-metadata-extensions-object) |

  ***

  <span id="conv-convert-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                             |
  | -------------- | ------ | ---------------------- | -------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-convert-metadata-linkpreview-object) |

  ***

  <span id="conv-convert-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-convert-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.sender` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-7"`                                                     |
  | `name`          | string  | User's display name                    | `"Henry Marino"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829868`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-convert-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.receiver` Object:**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-6"`                                                     |
  | `name`          | string  | User's display name                    | `"Ronald Jerry"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-6.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829859`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |

  ***

  <span id="conv-convert-data-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data` Object:**

  | Parameter  | Type   | Description                  | Sample Value                                      |
  | ---------- | ------ | ---------------------------- | ------------------------------------------------- |
  | `text`     | string | Message text                 | `"Hello"`                                         |
  | `resource` | string | SDK resource identifier      | `"REACT_NATIVE-4_0_14-..."`                       |
  | `entities` | object | Sender and receiver entities | [See below ↓](#conv-convert-data-entities-object) |
  | `metadata` | object | Injected metadata            | [See below ↓](#conv-convert-data-metadata-object) |

  ***

  <span id="conv-convert-data-metadata-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata` Object:**

  | Parameter   | Type   | Description              | Sample Value                                               |
  | ----------- | ------ | ------------------------ | ---------------------------------------------------------- |
  | `@injected` | object | Injected extensions data | [See below ↓](#conv-convert-data-metadata-injected-object) |

  ***

  <span id="conv-convert-data-metadata-injected-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected` Object:**

  | Parameter    | Type   | Description     | Sample Value                                                 |
  | ------------ | ------ | --------------- | ------------------------------------------------------------ |
  | `extensions` | object | Extensions data | [See below ↓](#conv-convert-data-metadata-extensions-object) |

  ***

  <span id="conv-convert-data-metadata-extensions-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions` Object:**

  | Parameter      | Type   | Description            | Sample Value                                                  |
  | -------------- | ------ | ---------------------- | ------------------------------------------------------------- |
  | `link-preview` | object | Link preview extension | [See below ↓](#conv-convert-data-metadata-linkpreview-object) |

  ***

  <span id="conv-convert-data-metadata-linkpreview-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.metadata.@injected.extensions.link-preview` Object:**

  | Parameter | Type  | Description     | Sample Value |
  | --------- | ----- | --------------- | ------------ |
  | `links`   | array | Extracted links | `[]`         |

  ***

  <span id="conv-convert-data-entities-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities` Object:**

  | Parameter  | Type   | Description             | Sample Value                                               |
  | ---------- | ------ | ----------------------- | ---------------------------------------------------------- |
  | `sender`   | object | Sender entity wrapper   | [See below ↓](#conv-convert-data-entities-sender-object)   |
  | `receiver` | object | Receiver entity wrapper | [See below ↓](#conv-convert-data-entities-receiver-object) |

  ***

  <span id="conv-convert-data-entities-sender-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                    |
  | ------------ | ------ | ------------------- | --------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                        |
  | `entity`     | object | User entity details | [See below ↓](#conv-convert-data-entities-sender-entity-object) |

  ***

  <span id="conv-convert-data-entities-sender-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.sender.entity` Object:**

  | Parameter      | Type   | Description              | Sample Value                                                            |
  | -------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`          | string | User's unique identifier | `"cometchat-uid-7"`                                                     |
  | `name`         | string | User's display name      | `"Henry Marino"`                                                        |
  | `avatar`       | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `role`         | string | User's role              | `"default"`                                                             |
  | `status`       | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt` | number | Last active timestamp    | `1771829868`                                                            |
  | `tags`         | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-convert-data-entities-receiver-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver` Object:**

  | Parameter    | Type   | Description         | Sample Value                                                      |
  | ------------ | ------ | ------------------- | ----------------------------------------------------------------- |
  | `entityType` | string | Type of entity      | `"user"`                                                          |
  | `entity`     | object | User entity details | [See below ↓](#conv-convert-data-entities-receiver-entity-object) |

  ***

  <span id="conv-convert-data-entities-receiver-entity-object" style={{scrollMarginTop: '100px'}} />

  **`lastMessage.data.entities.receiver.entity` Object:**

  | Parameter        | Type   | Description              | Sample Value                                                            |
  | ---------------- | ------ | ------------------------ | ----------------------------------------------------------------------- |
  | `uid`            | string | User's unique identifier | `"cometchat-uid-6"`                                                     |
  | `name`           | string | User's display name      | `"Ronald Jerry"`                                                        |
  | `avatar`         | string | User's avatar URL        | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-6.webp"` |
  | `role`           | string | User's role              | `"default"`                                                             |
  | `status`         | string | User's online status     | `"online"`                                                              |
  | `lastActiveAt`   | number | Last active timestamp    | `1771829859`                                                            |
  | `conversationId` | string | Conversation identifier  | `"cometchat-uid-6_user_cometchat-uid-7"`                                |
  | `tags`           | array  | User tags                | `[]`                                                                    |

  ***

  <span id="conv-convert-conversationwith-object" style={{scrollMarginTop: '100px'}} />

  **`conversationWith` Object (User):**

  | Parameter       | Type    | Description                            | Sample Value                                                            |
  | --------------- | ------- | -------------------------------------- | ----------------------------------------------------------------------- |
  | `uid`           | string  | User's unique identifier               | `"cometchat-uid-7"`                                                     |
  | `name`          | string  | User's display name                    | `"Henry Marino"`                                                        |
  | `avatar`        | string  | URL to user's avatar                   | `"https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-7.webp"` |
  | `status`        | string  | User's online status                   | `"online"`                                                              |
  | `role`          | string  | User's role                            | `"default"`                                                             |
  | `lastActiveAt`  | number  | Last active timestamp                  | `1771829868`                                                            |
  | `hasBlockedMe`  | boolean | Whether user has blocked current user  | `false`                                                                 |
  | `blockedByMe`   | boolean | Whether current user blocked this user | `false`                                                                 |
  | `deactivatedAt` | number  | Deactivation timestamp (0 if active)   | `0`                                                                     |
  | `tags`          | array   | User tags                              | `[]`                                                                    |
</Accordion>

<Note>
  While converting the `Message` object to the `Conversation` object, the `unreadMessageCount` & `tags` will not be available in the `Conversation` object. The unread message count needs to be managed in your client-side code.
</Note>

## Best Practices & Troubleshooting

<AccordionGroup>
  <Accordion title="Use pagination for large conversation lists">
    Always use `fetchNext()` in a loop or on-scroll handler to paginate through conversations. Fetching all conversations at once is not supported — the maximum per request is 50. Store the `ConversationsRequest` object and call `fetchNext()` repeatedly until it returns an empty list.
  </Accordion>

  <Accordion title="Keep conversation lists updated in real time">
    Use [real-time message listeners](/sdk/react-native/receive-messages) to receive new messages, then call `CometChatHelper.getConversationFromMessage()` to convert incoming messages into `Conversation` objects and update your list. Note that `unreadMessageCount` and `tags` are not available when converting from a message — manage those on the client side.
  </Accordion>

  <Accordion title="Filter conversations effectively with tags">
    Use `setTags()` to categorize conversations (e.g., `archivedChat`, `pinned`). Remember that conversation tags are one-way — tagging a conversation only applies for the logged-in user, not the other participant.
  </Accordion>

  <Accordion title="Conversations list is empty or missing expected results">
    Ensure the logged-in user has actually exchanged messages with the expected users or groups. Conversations only appear once at least one message has been sent. Also verify that any filters (conversation type, tags, unread) are not excluding the results you expect.
  </Accordion>

  <Accordion title="Search or unread filter not working">
    The `setSearchKeyword()` and `setUnread()` methods require the `Conversation & Advanced Search` feature, which is only available on `Advanced` and `Custom` [plans](https://www.cometchat.com/pricing). Enable it from the [CometChat Dashboard](https://app.cometchat.com) under Chats → Settings → General Configuration.
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Delete Conversation" icon="trash" href="/sdk/react-native/delete-conversation">
    Remove a conversation from the logged-in user's conversation list.
  </Card>

  <Card title="Receive Messages" icon="envelope" href="/sdk/react-native/receive-messages">
    Listen for real-time messages and update your conversation list.
  </Card>

  <Card title="Typing Indicators" icon="keyboard" href="/sdk/react-native/typing-indicators">
    Show real-time typing status within conversations.
  </Card>

  <Card title="Delivery & Read Receipts" icon="check-double" href="/sdk/react-native/delivery-read-receipts">
    Track when messages are delivered and read.
  </Card>
</CardGroup>
