---
url: https://talkjs.com/docs/UI_Components/React_Native/Object_Types/ConversationPredicate/
title: "ConversationPredicate | React Native | TalkJS Docs"
---

For AI agents: Find a documentation index at https://talkjs.com/llms.txt (full content at https://talkjs.com/llms-full.txt). Get a markdown version of any page by appending .md to its URL path.

# ConversationPredicate

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

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`](https://talkjs.com/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">`](https://talkjs.com/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`](https://talkjs.com/docs/UI_Components/React_Native/Components/ConversationList/#feedFilter)
-   [`MessageField`](https://talkjs.com/docs/UI_Components/React_Native/Object_Types/MessageField/#setvisible)
-   [`MessageFieldOptions`](https://talkjs.com/docs/UI_Components/React_Native/Components/Chatbox/#messagefieldoptions)
