Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1839,6 +1839,8 @@
"ui-kit/android/call-buttons",
"ui-kit/android/call-logs",
"ui-kit/android/search",
"ui-kit/android/pinned-messages",
"ui-kit/android/saved-messages",
"ui-kit/android/ai-assistant-chat-history",
"ui-kit/android/notification-feed"
]
Expand All@@ -1855,6 +1857,8 @@
"pages": [
"ui-kit/android/guide-overview",
"ui-kit/android/guide-threaded-messages",
"ui-kit/android/guide-thread-subscription",
"ui-kit/android/guide-pin-and-save-messages",
"ui-kit/android/guide-block-unblock-user",
"ui-kit/android/guide-new-chat",
"ui-kit/android/guide-message-privately",
Expand DownExpand Up@@ -4176,10 +4180,14 @@
"sdk/android/v5/additional-message-filtering",
"sdk/android/v5/retrieve-conversations",
"sdk/android/v5/threaded-messages",
"sdk/android/v5/thread-subscription",
"sdk/android/v5/edit-message",
"sdk/android/v5/delete-message",
"sdk/android/v5/flag-message",
"sdk/android/v5/pin-message",
"sdk/android/v5/save-message",
"sdk/android/v5/delete-conversation",
"sdk/android/v5/pin-conversation",
"sdk/android/v5/typing-indicators",
"sdk/android/v5/delivery-read-receipts",
"sdk/android/v5/transient-messages",
Expand Down
94 changes: 94 additions & 0 deletions sdk/android/v5/additional-message-filtering.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 39 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L39

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build();
Expand All@@ -60,7 +60,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 63 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L63

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.build()
Expand DownExpand Up@@ -91,7 +91,7 @@
<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

'messagesRequest' is repeated!

Check warning on line 94 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L94

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build();
Expand All@@ -101,7 +101,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 104 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
.setUID("cometchat-uid-1")
.setLimit(50)
.build()
Expand All@@ -117,12 +117,12 @@

You can achieve this using the `setGUID()` method. This method takes the GUID of a group for which the conversations are to be fetched. Passing a valid GUID to this method will return all the messages that are a part of the group conversation. Please note that the logged-in user must be a member of the group to fetch the messages for that group.

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder() .setGUID("cometchat-guid-1") .setLimit(50) .build();

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

'messagesRequest' is repeated!

Check warning on line 120 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L120

Did you really mean 'messagesRequest'?

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

'messagesRequest' is repeated!

Check warning on line 125 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L125

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build();
Expand All@@ -132,7 +132,7 @@

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 135 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
.setGUID("cometchat-guid-1")
.setLimit(50)
.build()
Expand All@@ -153,7 +153,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 156 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L156

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand All@@ -179,7 +179,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 182 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L182

Did you really mean 'messagesRequest'?
.setMessageId(100)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -216,7 +216,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 219 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L219

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand All@@ -242,7 +242,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 245 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L245

Did you really mean 'messagesRequest'?
.setTimestamp(1512687363)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -279,7 +279,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 282 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand All@@ -305,7 +305,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 308 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L308

Did you really mean 'messagesRequest'?
.setUnread(true)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -342,7 +342,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 345 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand All@@ -368,7 +368,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 371 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L371

Did you really mean 'messagesRequest'?
.hideMessagesFromBlockedUsers(true)
.setUID(UID)
.setLimit(50)
Expand DownExpand Up@@ -405,7 +405,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 408 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L408

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand All@@ -431,7 +431,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 434 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L434

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -461,14 +461,14 @@

*In other words, how do I fetch messages that have been updated after a particular date or time*

This can be achieved easily by setting the updatesOnly parameter to true. To do so, you can use the updatesOnly() method. This method takes a boolean input and can be used with the `setUpdatedAfter()` method to get jus the updated messages and not the messages sent/received after the specified time. This method cannot be used independently and always needs to be used with the `setUpdatedAfter()` method.

Check warning on line 464 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L464

Did you really mean 'updatesOnly'?

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 471 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L471

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -496,7 +496,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 499 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L499

Did you really mean 'messagesRequest'?
.setUpdatedAfter(1514321321)
.updatesOnly(true)
.setLimit(50)
Expand DownExpand Up@@ -538,7 +538,7 @@
categories.add("message");
categories.add("custom");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 541 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L541

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setGUID(GUID)
Expand DownExpand Up@@ -570,7 +570,7 @@
categories.add("message")
categories.add("custom")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 573 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L573

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setLimit(50)
.setUID(UID)
Expand DownExpand Up@@ -619,7 +619,7 @@
types.add("audio");
types.add("file");

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 622 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L622

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -661,7 +661,7 @@
types.add("audio")
types.add("file")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 664 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L664

Did you really mean 'messagesRequest'?
.setCategories(categories)
.setTypes(types)
.setLimit(50)
Expand DownExpand Up@@ -707,7 +707,7 @@
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 710 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L710

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -732,7 +732,7 @@
<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"
val messagesRequest = MessagesRequestBuilder()

Check warning on line 735 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L735

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setParentMessageId(100)
Expand All@@ -745,7 +745,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 748 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L748

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.setParentMessageId(100)
Expand DownExpand Up@@ -782,7 +782,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 785 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L785

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand All@@ -808,7 +808,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 811 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L811

Did you really mean 'messagesRequest'?
.setLimit(50)
.hideReplies(true)
.setGUID(GUID)
Expand DownExpand Up@@ -843,7 +843,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 846 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L846

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand All@@ -869,7 +869,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 872 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L872

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideDeletedMessages(true)
Expand DownExpand Up@@ -904,7 +904,7 @@
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 907 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L907

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand All@@ -930,7 +930,7 @@
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 933 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L933

Did you really mean 'messagesRequest'?
.setLimit(50)
.setGUID(GUID)
.hideQuotedMessages(true)
Expand DownExpand Up@@ -969,7 +969,7 @@
val tags: MutableList<String> = ArrayList()
tags.add("pinned")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 972 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setTags(tags)
Expand DownExpand Up@@ -1004,7 +1004,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1007 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1007

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.withTags(true)
Expand DownExpand Up@@ -1045,7 +1045,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1048 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasLinks(true)
Expand DownExpand Up@@ -1086,7 +1086,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1089 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1089

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasAttachments(true)
Expand DownExpand Up@@ -1127,7 +1127,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1130 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1130

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasReactions(true)
Expand DownExpand Up@@ -1168,7 +1168,7 @@
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1171 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1171

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.hasMentions(true)
Expand DownExpand Up@@ -1210,10 +1210,10 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val mentionedUIDs: MutableList<String> = ArrayList()

Check warning on line 1213 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1213

Did you really mean 'mentionedUIDs'?
mentionedUIDs.add("cometchat-uid-1")

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1216 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1216

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setMentionedUIDs(mentionedUIDs)
Expand DownExpand Up@@ -1256,11 +1256,11 @@
<Tab title="Kotlin">
```kotlin
val UID = "cometchat-uid-1"
val attachmentTypes: MutableList<AttachmentType> = ArrayList()

Check warning on line 1259 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1259

Did you really mean 'attachmentTypes'?
attachmentTypes.add(AttachmentType.FILE)
attachmentTypes.add(AttachmentType.IMAGE)

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1263 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setLimit(50)
.setUID(UID)
.setAttachmemnt(attachmentTypes)
Expand All@@ -1270,3 +1270,97 @@
</Tab>

</Tabs>

## Pinned messages

*In other words, how do I fetch the pinned messages of a conversation*

This can be achieved by setting the pinned flag to true using the `setPinned()` method. Setting a `UID` or a `GUID` is mandatory for this filter — pinned messages are always scoped to a single conversation. The returned list is sorted by the time of pinning, most recently pinned first.

<Tabs>
<Tab title="Java (User)">
```java
String UID = "cometchat-uid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build();
```

</Tab>

<Tab title="Java (Group)">
```java
String GUID = "cometchat-guid-1";

MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()

Check warning on line 1298 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1298

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build();
```

</Tab>

<Tab title="Kotlin (User)">
```kotlin
val UID = "cometchat-uid-1"

val messagesRequest = MessagesRequestBuilder()
.setPinned(true)
.setLimit(50)
.setUID(UID)
.build()
```

</Tab>

<Tab title="Kotlin (Group)">
```kotlin
val GUID = "cometchat-guid-1"

val messagesRequest = MessagesRequestBuilder()

Check warning on line 1324 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1324

Did you really mean 'messagesRequest'?
.setPinned(true)
.setLimit(50)
.setGUID(GUID)
.build()
```

</Tab>

</Tabs>

For the full pin workflow — pinning, unpinning, limits and real-time events — see [Pin A Message](/sdk/android/v5/pin-message).

## Saved messages

*In other words, how do I fetch the messages the logged-in user has saved*

This can be achieved by setting the saved flag to true using the `setSaved()` method. Saved messages are private to the logged-in user and span all of their conversations, so this filter must **not** be combined with `setUID()` or `setGUID()`. The returned list is sorted by the time of saving, most recently saved first.

<Tabs>
<Tab title="Java">
```java
MessagesRequest messagesRequest = new MessagesRequest.MessagesRequestBuilder()
.setSaved(true)
.setLimit(50)
.build();
```

</Tab>

<Tab title="Kotlin">
```kotlin
val messagesRequest = MessagesRequestBuilder()

Check warning on line 1356 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1356

Did you really mean 'messagesRequest'?
.setSaved(true)
.setLimit(50)
.build()
```

</Tab>

</Tabs>

For the full save workflow — saving, unsaving, limits and real-time events — see [Save A Message](/sdk/android/v5/save-message).

Check warning on line 1366 in sdk/android/v5/additional-message-filtering.mdx

View check run for this annotation

Mintlify/ Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

sdk/android/v5/additional-message-filtering.mdx#L1366

Did you really mean 'unsaving'?
Loading