---
url: https://talkjs.com/docs/UI_Components/React_Native/Object_Types/ConversationPredicate
---

# ConversationPredicate

Filter conversations by access, unread status, and custom fields.

Ask a question Copy for LLM [View as Markdown](/docs/UI_Components/React_Native/Object_Types/ConversationPredicate.md)
This object enables you to filter conversations in your conversation list down to a specific subset.

## Examples

These examples demonstrate how to filter the conversations in your conversation list.

The following filter removes conversations that the user no longer has access to:

```javascript
{
  access: ['!=', 'None'];
}
```

The following filter shows only conversations with unread messages:

```javascript
{
  hasUnreadMessages: true;
}
```

The following filter shows only conversations with a `category` custom field with a value of either "shoes" or "sandals":

```javascript
{
  custom: {
    category: ['oneOf', ['shoes', 'sandals']];
  }
}
```

## Properties

| Field | Type | Description |
| --- | --- | --- |
| **hasUnreadMessages** *(optional)* | `boolean` | Set this field to only select conversations that have, or don't have any, unread messages. |
| **custom** *(optional)* | [`CustomFieldPredicate`](/docs/UI_Components/React_Native/Object_Types/CustomFieldPredicate/) | Only select conversations that have particular custom fields set to particular values. It is not necessary for all conversations to have these keys. |
| **access** *(optional)* | [`FieldPredicate<"ReadWrite" \| "Read" \| "None">`](/docs/UI_Components/React_Native/Object_Types/FieldPredicate/) | Only select conversations that the current user as specific access to. Either: `"ReadWrite"`, `"Read"` or `"None"`. |

## Used by

- [`ConversationList`](/docs/UI_Components/React_Native/Components/ConversationList/#feedFilter)
- [`MessageField`](/docs/UI_Components/React_Native/Object_Types/MessageField/#setvisible)
- [`MessageFieldOptions`](/docs/UI_Components/React_Native/Components/Chatbox/#messagefieldoptions)