ConversationPredicate
This object enables you to filter conversations down to a specific subset.
Example 1
Example 2
Example 3
// To remove conversations that the user has no access to anymore{access: ['!=', 'None']}
// To hide read conversations{hasUnreadMessages: true}
// Assuming you have set a `category` custom field on your conversations// only show conversations with either category "shoes" or "sandals"{custom: {category: ["oneOf", ["shoes", "sandals"]]}}
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 | 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"> | Only select conversations that the current user as specific access to. Either: "ReadWrite" , "Read" or "None" . |