Skip to content
Merged
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
13 changes: 13 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3163,6 +3163,19 @@
"sdk/javascript/reactions"
]
},
{
"group": "Offline Support",
"pages": [
"sdk/javascript/offline-overview",
"sdk/javascript/offline-enable",
"sdk/javascript/offline-cached-data",
"sdk/javascript/offline-send",
"sdk/javascript/offline-sync",
"sdk/javascript/offline-media-caching",
"sdk/javascript/offline-encryption",
"sdk/javascript/offline-reference"
]
},
"sdk/javascript/calling-overview",
{
"group": "Users",
Expand Down
2 changes: 2 additions & 0 deletions sdk/javascript/ai-moderation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
| 3. AI Processing | Moderation service analyzes the content |
| 4. Result Event | `onMessageModerated` event fires with final status |

The `PENDING` here is the moderation status (`getModerationStatus()`). It is separate from the send status: with offline support enabled and a `MessageSentListener`, `onMessagePending` fires first, before the message reaches the server, and `onError` can mean the message is queued, not failed. See [Send While Offline](/sdk/javascript/offline-send).

## Supported Message Types

Moderation is triggered **only** for the following message types:
Expand All @@ -98,7 +100,7 @@
| Pending | `CometChat.ModerationStatus.PENDING` | Message is being processed by moderation |
| Approved | `CometChat.ModerationStatus.APPROVED` | Message passed moderation and is visible |
| Disapproved | `CometChat.ModerationStatus.DISAPPROVED` | Message violated rules and was blocked |
| Unmoderated | `CometChat.ModerationStatus.UNMODERATED` | Message was not subject to moderation (default) |

Check warning on line 103 in sdk/javascript/ai-moderation.mdx

View check run for this annotation

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

sdk/javascript/ai-moderation.mdx#L103

Did you really mean 'Unmoderated'?

## Implementation

Expand All @@ -109,7 +111,7 @@
<Tabs>
<Tab title="TypeScript">
```typescript
const textMessage = new CometChat.TextMessage(

Check warning on line 114 in sdk/javascript/ai-moderation.mdx

View check run for this annotation

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

sdk/javascript/ai-moderation.mdx#L114

Did you really mean 'textMessage'?
receiverUID,
"Hello, how are you?",
CometChat.RECEIVER_TYPE.USER
Expand All @@ -134,7 +136,7 @@
</Tab>
<Tab title="JavaScript">
```javascript
const textMessage = new CometChat.TextMessage(

Check warning on line 139 in sdk/javascript/ai-moderation.mdx

View check run for this annotation

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

sdk/javascript/ai-moderation.mdx#L139

Did you really mean 'textMessage'?
receiverUID,
"Hello, how are you?",
CometChat.RECEIVER_TYPE.USER
Expand Down Expand Up @@ -414,7 +416,7 @@

<Warning>
Always remove listeners when they're no longer needed (e.g., on component
unmount or page navigation). Failing to remove listeners can cause memory

Check warning on line 419 in sdk/javascript/ai-moderation.mdx

View check run for this annotation

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

sdk/javascript/ai-moderation.mdx#L419

Did you really mean 'unmount'?
leaks and duplicate event handling.
</Warning>

Expand Down
16 changes: 15 additions & 1 deletion sdk/javascript/all-real-time-listeners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
description: "Use CometChat real-time listeners for user presence, groups, messages, calls, AI assistant events, and ongoing calls."
---

CometChat provides the following listeners.
CometChat provides the following listeners. With offline support enabled, four more listeners report what the SDK does on the device; see [Offline listeners](#offline-listeners).

1. [User Listener](/sdk/javascript/all-real-time-listeners#user-listener)
2. [Group Listener](/sdk/javascript/all-real-time-listeners#group-listener)
Expand Down Expand Up @@ -35,9 +35,9 @@
/* when someuser/friend comes online, user will be received here */
console.log("On User Online:", { onlineUser });
},
onUserOffline: (offlineUser: CometChat.User) => {

Check warning on line 38 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L38

Did you really mean 'offlineUser'?
/* when someuser/friend went offline, user will be received here */
console.log("On User Offline:", { offlineUser });

Check warning on line 40 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L40

Did you really mean 'offlineUser'?
},
})
);
Expand Down Expand Up @@ -92,13 +92,13 @@

| Method | Information |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **onGroupMemberJoined(action: CometChat.Action, joinedUser: CometChat.User, joinedGroup: CometChat.Group)** | This method is triggered when a user joins any group. All the members present in the group will receive this event. |

Check warning on line 95 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L95

Did you really mean 'joinedUser'?

Check warning on line 95 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L95

Did you really mean 'joinedGroup'?
| **onGroupMemberLeft(action: CometChat.Action, leftUser: CometChat.User, leftGroup: CometChat.Group)** | This method is triggered when a user who was a member of any group leaves the group. All the members of the group receive this event. |

Check warning on line 96 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L96

Did you really mean 'leftUser'?

Check warning on line 96 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L96

Did you really mean 'leftGroup'?
| **onGroupMemberKicked(action: CometChat.Action, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group)** | This method is triggered when a user is kicked from a group. All the members including the user receive this event |

Check warning on line 97 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L97

Did you really mean 'kickedUser'?

Check warning on line 97 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L97

Did you really mean 'kickedBy'?

Check warning on line 97 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L97

Did you really mean 'kickedFrom'?
| **onGroupMemberBanned(action: CometChat.Action, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group)** | This method is triggered when a user is banned from a group. All the members including the user receive this event |

Check warning on line 98 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L98

Did you really mean 'bannedUser'?

Check warning on line 98 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L98

Did you really mean 'bannedBy'?

Check warning on line 98 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L98

Did you really mean 'bannedFrom'?
| **onGroupMemberUnbanned(action: CometChat.Action, unbannedUser: CometChat.User, unbannedBy: CometChat.User, unbannedFrom: CometChat.Group)** | This method is triggered when a user is banned from a group. All the members of the group receive this event. |

Check warning on line 99 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L99

Did you really mean 'unbannedUser'?

Check warning on line 99 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L99

Did you really mean 'unbannedBy'?

Check warning on line 99 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L99

Did you really mean 'unbannedFrom'?
| **onGroupMemberScopeChanged(action: CometChat.Action, changedUser: CometChat.User, newScope: string, oldScope: string, changedGroup: CometChat.Group)** | This method is triggered when the scope of any Group Member has been changed. All the members that are a part of that group receive this event |

Check warning on line 100 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L100

Did you really mean 'changedUser'?

Check warning on line 100 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L100

Did you really mean 'newScope'?

Check warning on line 100 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L100

Did you really mean 'oldScope'?

Check warning on line 100 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L100

Did you really mean 'changedGroup'?
| **onMemberAddedToGroup(action: CometChat.Action, userAdded: CometChat.User, addedBy: CometChat.User, addedTo: CometChat.Group)** | This method is triggered when a user is added to any group. All the members including the user himself receive this event. |

Check warning on line 101 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L101

Did you really mean 'userAdded'?

Check warning on line 101 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L101

Did you really mean 'addedBy'?

Check warning on line 101 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L101

Did you really mean 'addedTo'?

To add the `GroupListener`:

Expand All @@ -117,76 +117,76 @@
},
onGroupMemberLeft: (
message: CometChat.Action,
leftUser: CometChat.User,

Check warning on line 120 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L120

Did you really mean 'leftUser'?
leftGroup: CometChat.Group

Check warning on line 121 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L121

Did you really mean 'leftGroup'?
) => {
console.log("onGroupMemberLeft", { message, leftUser, leftGroup });

Check warning on line 123 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L123

Did you really mean 'leftUser'?

Check warning on line 123 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L123

Did you really mean 'leftGroup'?
},
onGroupMemberKicked: (
message: CometChat.Action,
kickedUser: CometChat.User,

Check warning on line 127 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L127

Did you really mean 'kickedUser'?
kickedBy: CometChat.User,

Check warning on line 128 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L128

Did you really mean 'kickedBy'?
kickedFrom: CometChat.Group

Check warning on line 129 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L129

Did you really mean 'kickedFrom'?
) => {
console.log("onGroupMemberKicked", {
message,
kickedUser,

Check warning on line 133 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L133

Did you really mean 'kickedUser'?
kickedBy,

Check warning on line 134 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L134

Did you really mean 'kickedBy'?
kickedFrom,

Check warning on line 135 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L135

Did you really mean 'kickedFrom'?
});
},
onGroupMemberBanned: (
message: CometChat.Action,
bannedUser: CometChat.User,

Check warning on line 140 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L140

Did you really mean 'bannedUser'?
bannedBy: CometChat.User,

Check warning on line 141 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L141

Did you really mean 'bannedBy'?
bannedFrom: CometChat.Group

Check warning on line 142 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L142

Did you really mean 'bannedFrom'?
) => {
console.log("onGroupMemberBanned", {
message,
bannedUser,

Check warning on line 146 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L146

Did you really mean 'bannedUser'?
bannedBy,

Check warning on line 147 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L147

Did you really mean 'bannedBy'?
bannedFrom,

Check warning on line 148 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L148

Did you really mean 'bannedFrom'?
});
},
onGroupMemberUnbanned: (
message: CometChat.Action,
unbannedUser: CometChat.User,

Check warning on line 153 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L153

Did you really mean 'unbannedUser'?
unbannedBy: CometChat.User,

Check warning on line 154 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L154

Did you really mean 'unbannedBy'?
unbannedFrom: CometChat.Group

Check warning on line 155 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L155

Did you really mean 'unbannedFrom'?
) => {
console.log("onGroupMemberUnbanned", {
message,
unbannedUser,

Check warning on line 159 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L159

Did you really mean 'unbannedUser'?
unbannedBy,

Check warning on line 160 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L160

Did you really mean 'unbannedBy'?
unbannedFrom,

Check warning on line 161 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L161

Did you really mean 'unbannedFrom'?
});
},
onGroupMemberScopeChanged: (
message: CometChat.Action,
changedUser: CometChat.User,

Check warning on line 166 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L166

Did you really mean 'changedUser'?
newScope: string,

Check warning on line 167 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L167

Did you really mean 'newScope'?
oldScope: string,

Check warning on line 168 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L168

Did you really mean 'oldScope'?
changedGroup: CometChat.Group

Check warning on line 169 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L169

Did you really mean 'changedGroup'?
) => {
console.log("onGroupMemberScopeChanged", {
message,
changedUser,

Check warning on line 173 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L173

Did you really mean 'changedUser'?
newScope,

Check warning on line 174 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L174

Did you really mean 'newScope'?
oldScope,

Check warning on line 175 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L175

Did you really mean 'oldScope'?
changedGroup,

Check warning on line 176 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L176

Did you really mean 'changedGroup'?
});
},
onMemberAddedToGroup: (
message: CometChat.Action,
userAdded: CometChat.User,

Check warning on line 181 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L181

Did you really mean 'userAdded'?
addedby: CometChat.User,

Check warning on line 182 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L182

Did you really mean 'addedby'?
addedTo: CometChat.Group

Check warning on line 183 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L183

Did you really mean 'addedTo'?
) => {
console.log("onMemberAddedToGroup", {
message,
userAdded,

Check warning on line 187 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L187

Did you really mean 'userAdded'?
addedby,

Check warning on line 188 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L188

Did you really mean 'addedby'?
addedTo,

Check warning on line 189 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L189

Did you really mean 'addedTo'?
});
},
})
Expand Down Expand Up @@ -291,6 +291,8 @@

Receive events for incoming messages, typing indicators, read/delivery receipts, message edits/deletes, reactions, and moderation results.

With offline support enabled, `MessageListener` also receives `onMessagesSynced` after the SDK catches up on reconnect. It carries updates to already-cached messages that changed while offline (reactions, edits, deletes and receipts); messages that arrived while offline still come through the typed callbacks such as `onTextMessageReceived`. See [Stay in Sync](/sdk/javascript/offline-sync).

| Method | Information |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **onTextMessageReceived(message: CometChat.TextMessage)** | This event is triggered when a Text Message is received. |
Expand All @@ -312,7 +314,7 @@
| **onMessagePinned(message: CometChat.BaseMessage)** | This event is triggered when a message is pinned in a user/group conversation. Broadcast to everyone in that conversation. |
| **onMessageUnpinned(message: CometChat.BaseMessage)** | This event is triggered when a message is unpinned in a user/group conversation. |
| **onMessageSaved(message: CometChat.BaseMessage)** | This event is triggered when the logged-in user saves a message. Private and delivered to that user's other devices only. |
| **onMessageUnsaved(message: CometChat.BaseMessage)** | This event is triggered when the logged-in user unsaves a message. |

Check warning on line 317 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L317

Did you really mean 'unsaves'?
| **onAIToolResultReceived(message: CometChat.AIToolResultMessage)** | This event is triggered when a persisted AI tool result message is received after an agent run completes. |
| **onAIToolArgumentsReceived(message: CometChat.AIToolArgumentMessage)** | This event is triggered when a persisted AI tool argument message is received after an agent run completes. |
| **onCardMessageReceived(message: CometChat.CardMessage)** | This event is triggered when a standalone [card message](/sdk/javascript/card-messages) is received. |
Expand All @@ -328,23 +330,23 @@
onTextMessageReceived: (textMessage: CometChat.TextMessage) => {
console.log("Text message received successfully", textMessage);
},
onMediaMessageReceived: (mediaMessage: CometChat.MediaMessage) => {

Check warning on line 333 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L333

Did you really mean 'mediaMessage'?
console.log("Media message received successfully", mediaMessage);

Check warning on line 334 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L334

Did you really mean 'mediaMessage'?
},
onCustomMessageReceived: (customMessage: CometChat.CustomMessage) => {

Check warning on line 336 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L336

Did you really mean 'customMessage'?
console.log("Custom message received successfully", customMessage);

Check warning on line 337 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L337

Did you really mean 'customMessage'?
},
onMessagesDelivered: (messageReceipt: CometChat.MessageReceipt) => {

Check warning on line 339 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L339

Did you really mean 'messageReceipt'?
console.log("Message Delivered", messageReceipt);

Check warning on line 340 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L340

Did you really mean 'messageReceipt'?
},
onMessagesRead: (messageReceipt: CometChat.MessageReceipt) => {

Check warning on line 342 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L342

Did you really mean 'messageReceipt'?
console.log("Message Read", messageReceipt);

Check warning on line 343 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L343

Did you really mean 'messageReceipt'?
},
onTypingStarted: (typingIndicator: CometChat.TypingIndicator) => {

Check warning on line 345 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L345

Did you really mean 'typingIndicator'?
console.log("Typing Started", typingIndicator);

Check warning on line 346 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L346

Did you really mean 'typingIndicator'?
},
onTypingEnded: (typingIndicator: CometChat.TypingIndicator) => {
console.log("Typing Ended", typingIndicator);

Check warning on line 349 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L349

Did you really mean 'typingIndicator'?
},
onMessageDeleted: (message: CometChat.BaseMessage) => {
console.log("Message Delted", message);
Expand All @@ -365,10 +367,10 @@
console.log("Message Moderated", message);
},
onMessagesDeliveredToAll: (messageReceipt: CometChat.MessageReceipt) => {
console.log("Message Delivered to All", messageReceipt);

Check warning on line 370 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L370

Did you really mean 'messageReceipt'?
},
onMessagesReadByAll: (messageReceipt: CometChat.MessageReceipt) => {
console.log("Message Read by All", messageReceipt);

Check warning on line 373 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L373

Did you really mean 'messageReceipt'?
},
onAIAssistantMessageReceived: (message: CometChat.AIAssistantMessage) => {
console.log("AI Assistant message received", message);
Expand Down Expand Up @@ -771,7 +773,7 @@
| `event.user.name` | `string` | Name of the user who started recording |
| `event.user.uid` | `string` | UID of the user who started recording |

**`onRecordingStopped()`**, **`onCallEnded()`**, **`onSessionTimeout()`**, **`onCallEndButtonPressed()`**, **`onScreenShareStarted()`**, **`onScreenShareStopped()`** — receive no arguments.

Check warning on line 776 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L776

Did you really mean 'listenerId'?

<Tabs>
<Tab title="TypeScript">
Expand All @@ -783,7 +785,7 @@
console.log("User joined:", user);
},
onUserLeft: (user: any) => {
console.log("User left:", user);

Check warning on line 788 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L788

Did you really mean 'onError'?
},
onCallEnded: () => {
console.log("Call ended");
Expand Down Expand Up @@ -849,15 +851,15 @@
const listenerID: string = "UNIQUE_LISTENER_ID";
CometChat.addLoginListener(
listenerID,
new CometChat.LoginListener({

Check warning on line 854 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L854

Did you really mean 'loginFailure'?
loginSuccess: (user: CometChat.User) => {
console.log("LoginListener :: loginSuccess", user);

Check warning on line 856 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L856

Did you really mean 'loginFailure'?

Check warning on line 856 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L856

Did you really mean 'logoutSuccess'?
},
loginFailure: (error: CometChat.CometChatException) => {

Check warning on line 858 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L858

Did you really mean 'logoutSuccess'?
console.log("LoginListener :: loginFailure", error);

Check warning on line 859 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L859

Did you really mean 'logoutFailure'?
},
logoutSuccess: () => {
console.log("LoginListener :: logoutSuccess");

Check warning on line 862 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L862

Did you really mean 'logoutFailure'?
},
logoutFailure: (error: CometChat.CometChatException) => {
console.log("LoginListener :: logoutFailure", error);
Expand Down Expand Up @@ -912,10 +914,10 @@
```typescript
const listenerID: string = "UNIQUE_LISTENER_ID";
CometChat.addConnectionListener(
listenerID,

Check warning on line 917 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L917

Did you really mean 'inConnecting'?
new CometChat.ConnectionListener({
onConnected: () => {
console.log("ConnectionListener :: connected");

Check warning on line 920 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L920

Did you really mean 'onDisconnected'?
},
inConnecting: () => {
console.log("ConnectionListener :: connecting");
Expand All @@ -934,10 +936,10 @@
```javascript
const listenerID = "UNIQUE_LISTENER_ID";
CometChat.addConnectionListener(
listenerID,

Check warning on line 939 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L939

Did you really mean 'inConnecting'?
new CometChat.ConnectionListener({
onConnected: () => {
console.log("ConnectionListener :: connected");

Check warning on line 942 in sdk/javascript/all-real-time-listeners.mdx

View check run for this annotation

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

sdk/javascript/all-real-time-listeners.mdx#L942

Did you really mean 'onDisconnected'?
},
inConnecting: () => {
console.log("ConnectionListener :: connecting");
Expand All @@ -960,6 +962,18 @@
CometChat.removeConnectionListener("UNIQUE_LISTENER_ID");
```


## Offline Listeners

With offline support enabled, these listeners report what the SDK does on the device rather than events from the server. Each is documented with examples on its own page.

| Listener | What it reports | Details |
|---|---|---|
| `OfflineMessageListener` | Every outbox transition, app-wide: a message queued, sent or failed | [Send While Offline](/sdk/javascript/offline-send) |
| `SyncListener` | Progress and outcome of each catch-up sync | [Stay in Sync](/sdk/javascript/offline-sync) |
| `OfflineCacheResetListener` | The on-device cache was rebuilt, for example after the encryption key was lost | [Encrypt the Cache](/sdk/javascript/offline-encryption) |
| `MediaDownloadListener` | A background media download finished or failed | [Media Caching](/sdk/javascript/offline-media-caching) |

---

## Next Steps
Expand Down
7 changes: 7 additions & 0 deletions sdk/javascript/block-users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| Key classes | `CometChat.User` (access via `getBlockedByMe()`, `getHasBlockedMe()`); direction via `CometChat.BlockedUsersRequest.directions.BLOCKED_BY_ME` / `.HAS_BLOCKED_ME` / `.BOTH` |
| Primary output | `blockUsers()` / `unblockUsers()` resolve to a `{ uid: "success" \| "fail" }` object (each UID processed independently); `fetchNext()` resolves to `Promise<CometChat.User[]>`; all reject with `CometChat.CometChatException` |
| Prerequisites | SDK initialized via [`CometChat.init()`](/sdk/javascript/setup-sdk) and a logged-in user via [`CometChat.login()`](/sdk/javascript/authentication-overview) |
| Constraints | `setDirection()` default is `BOTH`; `blockUsers()` / `unblockUsers()` take an array of UIDs |

Check warning on line 17 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L17

Did you really mean 'UIDs'?
| Related | [Retrieve Users](/sdk/javascript/retrieve-users) · [User Presence](/sdk/javascript/user-presence) · [User Management](/sdk/javascript/user-management) · [Flag a Message](/sdk/javascript/flag-message) |
| Full reference | [`User`](/sdk/reference/entities#user) |

Expand All @@ -22,12 +22,12 @@

## Block Users

Block users to prevent all communication with them. Use `blockUsers()` with an array of UIDs.

Check warning on line 25 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L25

Did you really mean 'UIDs'?

<Tabs>
<Tab title="TypeScript">
```typescript
const usersList: String[] = ["UID1", "UID2", "UID3"];

Check warning on line 30 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L30

Did you really mean 'usersList'?

CometChat.blockUsers(usersList).then(
(list: Object) => {
Expand Down Expand Up @@ -59,7 +59,7 @@
const usersList = ["UID1", "UID2", "UID3"];

try {
const list = await CometChat.blockUsers(usersList);

Check warning on line 62 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L62

Did you really mean 'usersList'?
console.log("users list blocked", { list });
} catch (error) {
console.log("Blocking user fails with error", error);
Expand All @@ -70,11 +70,11 @@

</Tabs>

Returns an object with UIDs as keys and `"success"` or `"fail"` as values. Each [`User`](/sdk/reference/entities#user) in the request is processed independently.

Check warning on line 73 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L73

Did you really mean 'UIDs'?

## Unblock Users

Unblock previously blocked users using `unblockUsers()` with an array of UIDs.

Check warning on line 77 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L77

Did you really mean 'UIDs'?

<Tabs>
<Tab title="TypeScript">
Expand Down Expand Up @@ -122,7 +122,7 @@

</Tabs>

Returns an object with UIDs as keys and `"success"` or `"fail"` as values. Each [`User`](/sdk/reference/entities#user) in the request is processed independently.

Check warning on line 125 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L125

Did you really mean 'UIDs'?

## Get List of Blocked Users

Expand Down Expand Up @@ -157,13 +157,15 @@

### Set Search Keyword

<Note>With offline support on, this filter is answered by the server only; `onCachedUsers` does not fire.</Note>

Filters blocked users by a search string.

<Tabs>
<Tab title="TypeScript">
```typescript
let limit: number = 30;
let searchKeyword: string = "super";

Check warning on line 168 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L168

Did you really mean 'searchKeyword'?
let blockedUsersRequest: CometChat.BlockedUsersRequest = new CometChat.BlockedUsersRequestBuilder()
.setLimit(limit)
.setSearchKeyword(searchKeyword)
Expand All @@ -175,7 +177,7 @@
<Tab title="JavaScript">
```javascript
let limit = 30;
let searchKeyword = "super";

Check warning on line 180 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L180

Did you really mean 'searchKeyword'?
let blockedUsersRequest = new CometChat.BlockedUsersRequestBuilder()
.setLimit(limit)
.setSearchKeyword(searchKeyword)
Expand Down Expand Up @@ -249,7 +251,7 @@
.build();

blockedUsersRequest.fetchNext().then(
(userList: CometChat.User[]) => {

Check warning on line 254 in sdk/javascript/block-users.mdx

View check run for this annotation

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

sdk/javascript/block-users.mdx#L254

Did you really mean 'userList'?
console.log("Blocked user list received:", userList);
}, (error: CometChat.CometChatException) => {
console.log("Blocked user list fetching failed with error:", error);
Expand Down Expand Up @@ -288,6 +290,11 @@
| blockedByMe | `getBlockedByMe()` | `boolean` | Whether the logged-in user has blocked this user |
| hasBlockedMe | `getHasBlockedMe()` | `boolean` | Whether this user has blocked the logged-in user |


## Offline Behaviour

With offline support enabled, `BlockedUsersRequest.fetchNext()` accepts a `UserFetchListener` and first delivers `onCachedUsers` from the SDK's own blocked-users list, which it refreshes on login and on reconnect and updates when you call `blockUsers()` or `unblockUsers()`. Then `onServerUsers` delivers the live page to reconcile by `uid`; the server page is not saved to the device. The cached page is empty when no users are blocked. When `setSearchKeyword()` is set, the cached phase is skipped, so `onCachedUsers` does not fire. Offline, the read ends with `onError` with code `FAILED_TO_FETCH` after the cached page, or with `onError` alone when the cached phase is skipped. See [Show Cached Data](/sdk/javascript/offline-cached-data).

---

## Next Steps
Expand Down
14 changes: 14 additions & 0 deletions sdk/javascript/campaigns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@
"light": "transparent",
"dark": "transparent"
},
"textColor": {

Check warning on line 93 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L93

Did you really mean 'textColor'?
"light": "#6C5CE7",
"dark": "#6C5CE7"
},
"size": 40,
"fontSize": 13,

Check warning on line 98 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L98

Did you really mean 'fontSize'?
"borderRadius": 6,
"padding": {
"top": 0,
Expand All @@ -113,14 +113,14 @@
"id": "col_98fed9bd-1a95-4cee-aa81-84a9016e41f2"
}
],
"fallbackText": "",

Check warning on line 116 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L116

Did you really mean 'fallbackText'?
"style": {
"background": {
"light": "#E8E8E8",
"dark": "#E8E8E8"
},
"borderRadius": 16,
"borderColor": {

Check warning on line 123 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L123

Did you really mean 'borderColor'?
"light": "#DFE6E9",
"dark": "#DFE6E9"
},
Expand Down Expand Up @@ -224,6 +224,20 @@

---

## Offline Behaviour

With offline support enabled, `NotificationFeedRequest.fetchNext()` accepts a `NotificationFeedFetchListener` and first delivers `onCachedNotificationFeedItems` from the device (empty when nothing was recorded), then `onServerNotificationFeedItems` with the live page to reconcile by item `id`. Offline, the read ends with `onError` with code `FAILED_TO_FETCH` after the cached page. A `fetchNext()` started while another fetch of the same request is running ends with `onError` with code `REQUEST_IN_PROGRESS`. See [Show Cached Data](/sdk/javascript/offline-cached-data).

| Builder method | Offline |
|---|---|
| `setLimit()` | Cached |
| `setReadState()` | Cached |
| `setCategory()` | Cached |
| `setChannelId()` | Cached |
| `setTags()` | Cached |
| `setDateFrom()` | Cached |
| `setDateTo()` | Cached |

## Retrieve Notification Categories

Use `NotificationCategoriesRequestBuilder` to fetch available categories for filter chips.
Expand All @@ -231,7 +245,7 @@
<Tabs>
<Tab title="JavaScript">
```javascript
const categoriesRequest = new CometChat.NotificationCategoriesRequestBuilder()

Check warning on line 248 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L248

Did you really mean 'categoriesRequest'?
.setLimit(50)
.build();

Expand Down Expand Up @@ -467,7 +481,7 @@
<Tabs>
<Tab title="JavaScript">
```javascript
const pushNotification = new CometChat.PushNotification(pushPayloadJson);

Check warning on line 484 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L484

Did you really mean 'pushNotification'?

CometChat.markPushNotificationDelivered(pushNotification).then(
() => { /* Success */ },
Expand Down Expand Up @@ -565,10 +579,10 @@
window.open(action.url, "_blank");
break;
case "chatWithUser":
// Navigate to chat with action.uid

Check warning on line 582 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L582

Did you really mean 'uid'?
break;
case "chatWithGroup":
// Navigate to group chat with action.guid

Check warning on line 585 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L585

Did you really mean 'guid'?
break;
}
}}
Expand All @@ -589,15 +603,15 @@

| Action Type | Parameters | Description |
| --- | --- | --- |
| `openUrl` | url, openIn | Open a URL in browser or webview |

Check warning on line 606 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L606

Did you really mean 'openIn'?

Check warning on line 606 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L606

Did you really mean 'webview'?
| `chatWithUser` | uid | Navigate to 1:1 chat |
| `chatWithGroup` | guid | Navigate to group chat |
| `sendMessage` | text, receiverUid, receiverGuid | Send a text message |

Check warning on line 609 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L609

Did you really mean 'receiverUid'?

Check warning on line 609 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L609

Did you really mean 'receiverGuid'?
| `copyToClipboard` | value | Copy text to clipboard |
| `downloadFile` | url, filename | Download a file |
| `initiateCall` | callType (audio/video), uid, guid | Start a call |

Check warning on line 612 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L612

Did you really mean 'callType'?

Check warning on line 612 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L612

Did you really mean 'uid'?

Check warning on line 612 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L612

Did you really mean 'guid'?
| `apiCall` | url, method, headers, body | Make an HTTP request |
| `customCallback` | callbackId, payload | App-specific logic |

Check warning on line 614 in sdk/javascript/campaigns.mdx

View check run for this annotation

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

sdk/javascript/campaigns.mdx#L614

Did you really mean 'callbackId'?

---

Expand Down
2 changes: 2 additions & 0 deletions sdk/javascript/connection-status.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

CometChat SDK provides you with a mechanism to get real-time status of the connection to CometChat web-socket servers.

With offline support enabled, your app keeps working without a connection: cached chats are shown instantly, and messages you send with a `MessageSentListener` are queued and delivered automatically on reconnect. See [Show Cached Data](/sdk/javascript/offline-cached-data) and [Send While Offline](/sdk/javascript/offline-send).

Connection Status provides you with the below 3 methods to get the status of the connection to CometChat web-socket servers:

| Delegate Method | Information |
Expand All @@ -20,14 +22,14 @@
<Tabs>
<Tab title="TypeScript">
```typescript
const connectionStatus: string = CometChat.getConnectionStatus();

Check warning on line 25 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L25

Did you really mean 'connectionStatus'?
```

</Tab>

<Tab title="JavaScript">
```javascript
const connectionStatus = CometChat.getConnectionStatus();

Check warning on line 32 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L32

Did you really mean 'connectionStatus'?
```

</Tab>
Expand All @@ -48,10 +50,10 @@
onConnected: () => {
console.log("ConnectionListener => On Connected");
},
inConnecting: () => {

Check warning on line 53 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L53

Did you really mean 'inConnecting'?
console.log("ConnectionListener => In connecting");
},
onDisconnected: () => {

Check warning on line 56 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L56

Did you really mean 'onDisconnected'?
console.log("ConnectionListener => On Disconnected");
},
})
Expand All @@ -69,10 +71,10 @@
onConnected: () => {
console.log("ConnectionListener => On Connected");
},
inConnecting: () => {

Check warning on line 74 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L74

Did you really mean 'inConnecting'?
console.log("ConnectionListener => In connecting");
},
onDisconnected: () => {

Check warning on line 77 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L77

Did you really mean 'onDisconnected'?
console.log("ConnectionListener => On Disconnected");
},
})
Expand All @@ -85,7 +87,7 @@

<Warning>
Always remove connection listeners when they're no longer needed (e.g., on
component unmount or page navigation). Failing to remove listeners can cause

Check warning on line 90 in sdk/javascript/connection-status.mdx

View check run for this annotation

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

sdk/javascript/connection-status.mdx#L90

Did you really mean 'unmount'?
memory leaks and duplicate event handling.
</Warning>

Expand Down
2 changes: 2 additions & 0 deletions sdk/javascript/delete-group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: "Delete CometChat groups from JavaScript apps by GUID when the logg

Use `deleteGroup()` with the group's GUID.

Deleting a group needs a connection. With offline support enabled, `deleteGroup()` is **not** queued for later. After it succeeds, the group's conversation and cached messages are removed from the on-device cache at the next catch-up sync, and any messages still queued to it then fail with reason `DISCARDED`. See [Send While Offline](/sdk/javascript/offline-send).

<Tabs>
<Tab title="TypeScript">
```typescript
Expand Down
2 changes: 2 additions & 0 deletions sdk/javascript/delete-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@

Use `deleteMessage()` with the message ID.

Deleting a message needs a connection. With offline support enabled, `deleteMessage()` is **not** queued for later. After it succeeds, the deletion is applied to the message in the on-device cache if it is already cached; it never adds a new message. See [Send While Offline](/sdk/javascript/offline-send).

<Tabs>
<Tab title="TypeScript">
```typescript
let messageId: string = "1";

Check warning on line 20 in sdk/javascript/delete-message.mdx

View check run for this annotation

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

sdk/javascript/delete-message.mdx#L20

Did you really mean 'messageId'?

CometChat.deleteMessage(messageId).then(
(message: CometChat.BaseMessage) => {
Expand Down Expand Up @@ -58,7 +60,7 @@

</Tabs>

The deleted message object is returned with `deletedAt` (timestamp) and `deletedBy` (UID of deleter) fields set.

Check warning on line 63 in sdk/javascript/delete-message.mdx

View check run for this annotation

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

sdk/javascript/delete-message.mdx#L63

Did you really mean 'deleter'?

The `deleteMessage()` method returns a [`BaseMessage`](/sdk/reference/messages#basemessage) object.

Expand All @@ -66,8 +68,8 @@

| Field | Getter | Return Type | Description |
| --------- | ---------------- | ----------- | --------------------------------------- |
| deletedAt | `getDeletedAt()` | `number` | Timestamp when the message was deleted |

Check warning on line 71 in sdk/javascript/delete-message.mdx

View check run for this annotation

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

sdk/javascript/delete-message.mdx#L71

Did you really mean 'deletedAt'?
| deletedBy | `getDeletedBy()` | `string` | UID of the user who deleted the message |

Check warning on line 72 in sdk/javascript/delete-message.mdx

View check run for this annotation

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

sdk/javascript/delete-message.mdx#L72

Did you really mean 'deletedBy'?

Message editing in CometChat is controlled by -

Expand Down Expand Up @@ -124,8 +126,8 @@

| Field | Getter | Return Type | Description |
| --------- | ---------------- | ----------- | --------------------------------------- |
| deletedAt | `getDeletedAt()` | `number` | Timestamp when the message was deleted |

Check warning on line 129 in sdk/javascript/delete-message.mdx

View check run for this annotation

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

sdk/javascript/delete-message.mdx#L129

Did you really mean 'deletedAt'?
| deletedBy | `getDeletedBy()` | `string` | UID of the user who deleted the message |

Check warning on line 130 in sdk/javascript/delete-message.mdx

View check run for this annotation

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

sdk/javascript/delete-message.mdx#L130

Did you really mean 'deletedBy'?

## Missed Message Delete Events

Expand Down
2 changes: 2 additions & 0 deletions sdk/javascript/edit-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

Use `editMessage()` with a [`TextMessage`](/sdk/reference/messages#textmessage) or [`CustomMessage`](/sdk/reference/messages#custommessage) object. Set the message ID using `setId()`.

Editing a message needs a connection. With offline support enabled, `editMessage()` is **not** queued for later. After it succeeds, the edit is applied to the message in the on-device cache if it is already cached; it never adds a new message. See [Send While Offline](/sdk/javascript/offline-send).

### Add/Update Tags

Use `setTags()` to update tags when editing. New tags replace existing ones.
Expand Down Expand Up @@ -63,10 +65,10 @@
<Tab title="TypeScript">
```typescript
let receiverID: string = "RECEIVER_UID";
let messageText: string = "Hello world!";

Check warning on line 68 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L68

Did you really mean 'messageText'?
let receiverType: string = CometChat.RECEIVER_TYPE.USER;

Check warning on line 69 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L69

Did you really mean 'receiverType'?
let messageId: number = 1;

Check warning on line 70 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L70

Did you really mean 'messageId'?
let textMessage: CometChat.TextMessage = new CometChat.TextMessage(receiverID, messageText, receiverType);

Check warning on line 71 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L71

Did you really mean 'textMessage'?

Check warning on line 71 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L71

Did you really mean 'messageText'?

textMessage.setId(messageId);

Expand Down Expand Up @@ -135,8 +137,8 @@

| Field | Getter | Return Type | Description |
| -------- | --------------- | ----------- | -------------------------------------- |
| editedAt | `getEditedAt()` | `number` | Timestamp when the message was edited |

Check warning on line 140 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L140

Did you really mean 'editedAt'?
| editedBy | `getEditedBy()` | `string` | UID of the user who edited the message |

Check warning on line 141 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L141

Did you really mean 'editedBy'?

By default, CometChat allows certain users to edit a message.

Expand Down Expand Up @@ -190,7 +192,7 @@
</Tabs>

<Warning>
Always remove message listeners when they're no longer needed (e.g., on component unmount or page navigation). Failing to remove listeners can cause memory leaks and duplicate event handling.

Check warning on line 195 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L195

Did you really mean 'unmount'?

```javascript
CometChat.removeMessageListener("UNIQUE_LISTENER_ID");
Expand All @@ -204,8 +206,8 @@

| Field | Getter | Return Type | Description |
| -------- | --------------- | ----------- | -------------------------------------- |
| editedAt | `getEditedAt()` | `number` | Timestamp when the message was edited |

Check warning on line 209 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L209

Did you really mean 'editedAt'?
| editedBy | `getEditedBy()` | `string` | UID of the user who edited the message |

Check warning on line 210 in sdk/javascript/edit-message.mdx

View check run for this annotation

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

sdk/javascript/edit-message.mdx#L210

Did you really mean 'editedBy'?

## Missed Message Edit Events

Expand Down
39 changes: 39 additions & 0 deletions sdk/javascript/group-kick-ban-members.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Ban Or Kick Member From A Group"
description: "Kick, ban, and unban CometChat group members in JavaScript apps when the logged-in user is an admin or moderator."

Check warning on line 3 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L3

Did you really mean 'unban'?
---

<Accordion title="AI Integration Quick Reference">
Expand All @@ -15,7 +15,7 @@
| Primary output | `kickGroupMember()` / `banGroupMember()` / `unbanGroupMember()` resolve to `boolean` (`true`) · `BannedMembersRequest.fetchNext()` resolves to `CometChat.GroupMember[]` · all reject with `CometChat.CometChatException` |
| Listeners registered | `CometChat.GroupListener` via `CometChat.addGroupListener(listenerID, ...)` / `CometChat.removeGroupListener(listenerID)`; key callbacks `onGroupMemberKicked`, `onGroupMemberBanned`, `onGroupMemberUnbanned` |
| Prerequisites | SDK initialized via [`CometChat.init()`](/sdk/javascript/setup-sdk) and a logged-in user via [`CometChat.login()`](/sdk/javascript/authentication-overview) |
| Constraints | Kick, ban, and unban can only be performed by the group **Admin** or **Moderator**. A kicked user can rejoin; a banned user cannot rejoin until unbanned |

Check warning on line 18 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L18

Did you really mean 'unban'?
| Related | [Add Members](/sdk/javascript/group-add-members) · [Change Member Scope](/sdk/javascript/group-change-member-scope) · [Retrieve Group Members](/sdk/javascript/retrieve-group-members) · [Leave a Group](/sdk/javascript/leave-group) |
| Full reference | [`GroupMember`](/sdk/reference/entities#groupmember) · [`User`](/sdk/reference/entities#user) · [`Group`](/sdk/reference/entities#group) · [`Action`](/sdk/reference/messages#action) |

Expand All @@ -25,7 +25,7 @@

1. Kick a member from the group
2. Ban a member from the group
3. Unban a member from the group

Check warning on line 28 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L28

Did you really mean 'Unban'?
4. Update the scope of the member of the group

All the above actions can only be performed by the **Admin** or the **Moderator** of the group.
Expand Down Expand Up @@ -132,9 +132,9 @@

On success, the method resolves with a `boolean` value (`true`) confirming the operation.

## Unban a Group Member

Check warning on line 135 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L135

Did you really mean 'Unban'?

Admins or Moderators can unban a previously banned member using `unbanGroupMember()`.

Check warning on line 137 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L137

Did you really mean 'unban'?

<Tabs>
<Tab title="TypeScript">
Expand Down Expand Up @@ -218,6 +218,8 @@

### Set Search Keyword

<Note>With offline support on, this filter is answered by the server only; the cached page is empty.</Note>

Filters banned members by a search string.

<Tabs>
Expand All @@ -225,7 +227,7 @@
```typescript
let GUID: string = "GUID";
let limit: number = 30;
let searchKeyword: string = "super";

Check warning on line 230 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L230

Did you really mean 'searchKeyword'?
let bannedGroupMembersRequest: CometChat.BannedMembersRequest = new CometChat.BannedMembersRequestBuilder(GUID)
.setLimit(limit)
.setSearchKeyword(searchKeyword)
Expand All @@ -238,7 +240,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let searchKeyword = "super";

Check warning on line 243 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L243

Did you really mean 'searchKeyword'?
let bannedGroupMembersRequest = new CometChat.BannedMembersRequestBuilder(GUID)
.setLimit(limit)
.setSearchKeyword(searchKeyword)
Expand All @@ -261,7 +263,7 @@
.build();

bannedGroupMembersRequest.fetchNext().then(
(bannedMembers: CometChat.GroupMember[]) => {

Check warning on line 266 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L266

Did you really mean 'bannedMembers'?
console.log("Banned Group Member list fetched successfully:", bannedMembers);
}, (error: CometChat.CometChatException) => {
console.log("Banned Group Member list fetching failed with exception:", error);
Expand Down Expand Up @@ -294,6 +296,32 @@

The `fetchNext()` method returns an array of [`GroupMember`](/sdk/reference/entities#groupmember) objects representing the banned members of the group.

### Set Scopes

Filters banned members by one or more scopes (`admin`, `moderator`, `participant`).

<Tabs>
<Tab title="TypeScript">
```typescript
let GUID: string = "GUID";
let scopes: Array<String> = ["admin", "moderator"];
let bannedGroupMembersRequest: CometChat.BannedMembersRequest = new CometChat.BannedMembersRequestBuilder(GUID)
.setScopes(scopes)
.build();
```
</Tab>

<Tab title="JavaScript">
```javascript
let GUID = "GUID";
let scopes = ["admin", "moderator"];
let bannedGroupMembersRequest = new CometChat.BannedMembersRequestBuilder(GUID)
.setScopes(scopes)
.build();
```
</Tab>
</Tabs>

## Real-Time Kick/Ban/Unban Events

Implement these `GroupListener` methods to receive real-time notifications:
Expand All @@ -315,10 +343,10 @@
onGroupMemberKicked: (message: CometChat.Action, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group) => {
console.log("User kicked", { message, kickedUser, kickedBy, kickedFrom });
},
onGroupMemberBanned: (message: CometChat.Action, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group) => {

Check warning on line 346 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L346

Did you really mean 'bannedUser'?

Check warning on line 346 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L346

Did you really mean 'bannedBy'?

Check warning on line 346 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L346

Did you really mean 'bannedFrom'?
console.log("User banned", { message, bannedUser, bannedBy, bannedFrom });
},
onGroupMemberUnbanned: (message: CometChat.Action, unbannedUser: CometChat.User, unbannedBy: CometChat.User, unbannedFrom: CometChat.Group) => {

Check warning on line 349 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L349

Did you really mean 'unbannedUser'?

Check warning on line 349 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L349

Did you really mean 'unbannedBy'?

Check warning on line 349 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L349

Did you really mean 'unbannedFrom'?
console.log("User unbanned", { message, unbannedUser, unbannedBy, unbannedFrom });
}
})
Expand Down Expand Up @@ -353,7 +381,7 @@
</Tabs>

<Warning>
Always remove group listeners when they're no longer needed (e.g., on component unmount or page navigation). Failing to remove listeners can cause memory leaks and duplicate event handling.

Check warning on line 384 in sdk/javascript/group-kick-ban-members.mdx

View check run for this annotation

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

sdk/javascript/group-kick-ban-members.mdx#L384

Did you really mean 'unmount'?

```javascript
CometChat.removeGroupListener("UNIQUE_LISTENER_ID");
Expand Down Expand Up @@ -392,6 +420,17 @@
| `actionOn` | [User](/sdk/reference/entities#user) | The member who was unbanned |
| `actionFor` | [Group](/sdk/reference/entities#group) | The group |


## Offline Behaviour

With offline support enabled, `BannedMembersRequest.fetchNext()` accepts a `BannedMemberFetchListener` and first delivers `onCachedBannedGroupMembers` from the device (empty when nothing was recorded), then `onServerBannedGroupMembers` with the live page to reconcile by `uid`. Offline, the read ends with `onError` with code `FAILED_TO_FETCH` after the cached page. A request that uses a server-only filter records nothing, so its cached page is always empty. See [Show Cached Data](/sdk/javascript/offline-cached-data).

| Builder method | Offline |
|---|---|
| `setLimit()` | Cached |
| `setScopes()` | Cached |
| `setSearchKeyword()` | Server only — cached page is empty |

---

## Next Steps
Expand Down
10 changes: 10 additions & 0 deletions sdk/javascript/mentions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<Tab title="TypeScript (User)">
```typescript
let receiverID: string = "UID";
let messageText: string = "Hello <@uid:cometchat-uid-1>";

Check warning on line 35 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L35

Did you really mean 'messageText'?
let receiverType: string = CometChat.RECEIVER_TYPE.USER;

Check warning on line 36 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L36

Did you really mean 'receiverType'?
let textMessage: CometChat.TextMessage = new CometChat.TextMessage(receiverID, messageText, receiverType);

Check warning on line 37 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L37

Did you really mean 'textMessage'?

Check warning on line 37 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L37

Did you really mean 'messageText'?

CometChat.sendMessage(textMessage).then(
(message: CometChat.TextMessage) => {
Expand Down Expand Up @@ -74,12 +74,12 @@
<Tab title="TypeScript (Group)">
```typescript
let receiverID: string = "GUID",
messageText: string = "Hello world!",

Check warning on line 77 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L77

Did you really mean 'messageText'?
receiverType: string = CometChat.RECEIVER_TYPE.GROUP,

Check warning on line 78 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L78

Did you really mean 'receiverType'?
textMessage: CometChat.TextMessage = new CometChat.TextMessage(

Check warning on line 79 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L79

Did you really mean 'textMessage'?
receiverID,
messageText,

Check warning on line 81 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L81

Did you really mean 'messageText'?
receiverType

Check warning on line 82 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L82

Did you really mean 'receiverType'?
);

CometChat.sendMessage(textMessage).then(
Expand Down Expand Up @@ -144,7 +144,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 147 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L147

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand Down Expand Up @@ -201,7 +201,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 204 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L204

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand Down Expand Up @@ -260,7 +260,7 @@

| Field | Getter | Return Type | Description |
| ----------------------------- | --------------------- | ---------------------------------------- | --------------------------------------- |
| mentionedUsers | `getMentionedUsers()` | [`User[]`](/sdk/reference/entities#user) | Array of users mentioned in the message |

Check warning on line 263 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L263

Did you really mean 'mentionedUsers'?
| tags (on each mentioned user) | `getTags()` | `string[]` | Tags associated with the mentioned user |

## Mentions With Blocked Info
Expand All @@ -271,7 +271,7 @@

| Field | Getter | Return Type | Description |
| ------------------------------------- | --------------------- | ---------------------------------------- | ---------------------------------------------------------- |
| mentionedUsers | `getMentionedUsers()` | [`User[]`](/sdk/reference/entities#user) | Array of users mentioned in the message |

Check warning on line 274 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L274

Did you really mean 'mentionedUsers'?
| blockedByMe (on each mentioned user) | `getBlockedByMe()` | `boolean` | Whether the logged-in user has blocked this mentioned user |
| hasBlockedMe (on each mentioned user) | `getHasBlockedMe()` | `boolean` | Whether this mentioned user has blocked the logged-in user |

Expand All @@ -280,7 +280,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 283 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L283

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand Down Expand Up @@ -339,7 +339,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 342 in sdk/javascript/mentions.mdx

View check run for this annotation

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

sdk/javascript/mentions.mdx#L342

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand Down Expand Up @@ -406,6 +406,16 @@

The getMentionedUsers() method returns an array of [`User`](/sdk/reference/entities#user) objects.


## Offline Behaviour

With offline support enabled, these mention fetches run in two phases: `onCachedMessages` delivers the cached page first (even when empty), then `onServerMessages` delivers the reconciled server copy. Offline, the read ends with `onError` with code `FAILED_TO_FETCH` after the cached page. To queue a mentioned message sent while offline, pass a `MessageSentListener` to `sendMessage()`; `onError` can then mean "queued", not "failed" (see [Send While Offline](/sdk/javascript/offline-send)). See [Show Cached Data](/sdk/javascript/offline-cached-data).

| Builder method | Offline behaviour |
| --- | --- |
| `mentionsWithTagInfo()` | Cached, without the tag info of the mentioned users |
| `mentionsWithBlockedInfo()` | Cached, without the blocked info of the mentioned users |

---

## Next Steps
Expand Down
37 changes: 37 additions & 0 deletions sdk/javascript/message-filtering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<Tabs>
<Tab title="TypeScript">
```typescript
let messagesRequest: CometChat.MessagesRequest =

Check warning on line 50 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L50

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder().setLimit(50).build();
```

Expand All @@ -55,7 +55,7 @@

<Tab title="JavaScript">
```javascript
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 58 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L58

Did you really mean 'messagesRequest'?
.setLimit(50)
.build();
```
Expand All @@ -72,7 +72,7 @@
<Tab title="TypeScript">
```typescript
let UID = "UID";
let messagesRequest: CometChat.MessagesRequest =

Check warning on line 75 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L75

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder().setUID(UID).setLimit(50).build();
```

Expand All @@ -81,7 +81,7 @@
<Tab title="JavaScript">
```javascript
let UID = "UID";
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 84 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L84

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(50)
.build();
Expand All @@ -101,7 +101,7 @@
<Tab title="TypeScript">
```typescript
let GUID: string = "GUID";
let messagesRequest: CometChat.MessagesRequest =

Check warning on line 104 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L104

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder().setGUID(GUID).setLimit(50).build();
```

Expand All @@ -110,7 +110,7 @@
<Tab title="JavaScript">
```javascript
let GUID = "GUID";
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 113 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L113

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(50)
.build();
Expand All @@ -130,9 +130,9 @@
<Tab title="TypeScript (User)">
```typescript
let UID: string = "UID",
messageId: number = 1,

Check warning on line 133 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L133

Did you really mean 'messageId'?
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 135 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L135

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setMessageId(messageId)
Expand All @@ -145,9 +145,9 @@
<Tab title="JavaScript (User)">
```javascript
let UID = "UID";
let messageId = 1;

Check warning on line 148 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L148

Did you really mean 'messageId'?
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 150 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L150

Did you really mean 'messagesRequest'?
.setUID(UID)
.setMessageId(messageId)
.setLimit(limit)
Expand All @@ -159,9 +159,9 @@
<Tab title="TypeScript (Group)">
```typescript
let GUID: string = "GUID",
messageId: number = 1,

Check warning on line 162 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L162

Did you really mean 'messageId'?
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 164 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L164

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setMessageId(messageId)
Expand All @@ -174,9 +174,9 @@
<Tab title="JavaScript (Group)">
```javascript
let GUID = "GUID";
let messageId = 1;

Check warning on line 177 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L177

Did you really mean 'messageId'?
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 179 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L179

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setMessageId(messageId)
.setLimit(limit)
Expand All @@ -199,7 +199,7 @@
let UID: string = "UID",
timestamp: number = 1602221371,
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 202 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L202

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setTimestamp(timestamp)
Expand All @@ -214,7 +214,7 @@
let UID = "UID";
let timestamp = 1602221371;
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 217 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L217

Did you really mean 'messagesRequest'?
.setUID(UID)
.setTimestamp(timestamp)
.setLimit(limit)
Expand All @@ -228,7 +228,7 @@
let GUID: string = "GUID",
timestamp: number = 1602221371,
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 231 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L231

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setTimestamp(timestamp)
Expand All @@ -243,7 +243,7 @@
let GUID = "GUID";
let timestamp = 1602221371;
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 246 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L246

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setTimestamp(timestamp)
.setLimit(limit)
Expand All @@ -265,7 +265,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 268 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L268

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setUnread(true)
Expand All @@ -279,7 +279,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 282 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L282

Did you really mean 'messagesRequest'?
.setUID(UID)
.setUnread(true)
.setLimit(limit)
Expand All @@ -292,7 +292,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 295 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L295

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setUnread(true)
Expand All @@ -306,7 +306,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 309 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L309

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setUnread(true)
.setLimit(limit)
Expand All @@ -328,7 +328,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 331 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L331

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.hideMessagesFromBlockedUsers(true)
Expand All @@ -342,7 +342,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 345 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L345

Did you really mean 'messagesRequest'?
.setUID(UID)
.hideMessagesFromBlockedUsers(true)
.setLimit(limit)
Expand All @@ -355,7 +355,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 358 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L358

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.hideMessagesFromBlockedUsers(true)
Expand All @@ -369,7 +369,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 372 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L372

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.hideMessagesFromBlockedUsers(true)
.setLimit(limit)
Expand All @@ -392,7 +392,7 @@
let UID: string = "UID",
limit: number = 30,
timestamp: string = "1602221371",
messagesRequest: CometChat.MessagesRequest =

Check warning on line 395 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L395

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setUpdatedAfter(timestamp)
Expand All @@ -407,7 +407,7 @@
let UID = "UID";
let limit = 30;
let timestamp = 1602221371;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 410 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L410

Did you really mean 'messagesRequest'?
.setUID(UID)
.setUpdatedAfter(timestamp)
.setLimit(limit)
Expand All @@ -421,7 +421,7 @@
let GUID: string = "GUID",
limit: number = 30,
timestamp: string = "1602221371",
messagesRequest: CometChat.MessagesRequest =

Check warning on line 424 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L424

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setUpdatedAfter(timestamp)
Expand All @@ -436,7 +436,7 @@
let GUID = "GUID";
let limit = 30;
let timestamp = 1602221371;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 439 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L439

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setUpdatedAfter(timestamp)
.setLimit(limit)
Expand All @@ -451,6 +451,8 @@

## Updated messages only

<Note>With offline support on, this filter is answered by the server only; the cached page is empty.</Note>

Use `updatesOnly(true)` with `setUpdatedAfter()` to fetch only updated messages (not newly received ones). This method must be used together with `setUpdatedAfter()`.

<Tabs>
Expand All @@ -459,7 +461,7 @@
let UID: string = "UID",
limit: number = 30,
timestamp: string = "1602221371",
messagesRequest: CometChat.MessagesRequest =

Check warning on line 464 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L464

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setUpdatedAfter(timestamp)
Expand All @@ -475,7 +477,7 @@
let UID = "UID";
let limit = 30;
let timestamp = 1602221371;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 480 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L480

Did you really mean 'messagesRequest'?
.setUID(UID)
.setUpdatedAfter(timestamp)
.updatesOnly(true)
Expand All @@ -490,7 +492,7 @@
let GUID: string = "GUID",
limit: number = 30,
timestamp: string = "1602221371",
messagesRequest: CometChat.MessagesRequest =

Check warning on line 495 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L495

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setUpdatedAfter(timestamp)
Expand All @@ -506,7 +508,7 @@
let GUID = "GUID";
let limit = 30;
let timestamp = 1602221371;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 511 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L511

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setUpdatedAfter(timestamp)
.updatesOnly(true)
Expand All @@ -530,7 +532,7 @@
let UID: string = "UID",
limit: number = 30,
categories: Array<String> = ["message", "custom"],
messagesRequest: CometChat.MessagesRequest =

Check warning on line 535 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L535

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setCategories(categories)
Expand All @@ -545,7 +547,7 @@
let UID = "UID";
let limit = 30;
let categories = ["message", "custom"];
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 550 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L550

Did you really mean 'messagesRequest'?
.setUID(UID)
.setCategories(categories)
.setLimit(limit)
Expand All @@ -559,7 +561,7 @@
let GUID: string = "GUID",
limit: number = 30,
categories: Array<String> = ["message", "custom"],
messagesRequest: CometChat.MessagesRequest =

Check warning on line 564 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L564

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setCategories(categories)
Expand All @@ -574,7 +576,7 @@
let GUID = "GUID";
let limit = 30;
let categories = ["message", "custom"];
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 579 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L579

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setCategories(categories)
.setLimit(limit)
Expand All @@ -598,7 +600,7 @@
limit: number = 30,
categories: Array<String> = ["message", "custom"],
types: Array<String> = ["image", "video", "audio", "file"],
messagesRequest: CometChat.MessagesRequest =

Check warning on line 603 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L603

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setCategories(categories)
Expand All @@ -615,7 +617,7 @@
let limit = 30;
let categories = ["message"];
let types = ["image", "video", "audio", "file"];
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 620 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L620

Did you really mean 'messagesRequest'?
.setUID(UID)
.setCategories(categories)
.setTypes(types)
Expand All @@ -631,7 +633,7 @@
limit: number = 30,
categories: Array<String> = ["message", "custom"],
types: Array<String> = ["image", "video", "audio", "file"],
messagesRequest: CometChat.MessagesRequest =

Check warning on line 636 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L636

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setCategories(categories)
Expand All @@ -648,7 +650,7 @@
let limit = 30;
let categories = ["message"];
let types = ["image", "video", "audio", "file"];
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 653 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L653

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setCategories(categories)
.setTypes(types)
Expand All @@ -671,8 +673,8 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messageId: number = 1,

Check warning on line 676 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L676

Did you really mean 'messageId'?
messagesRequest: CometChat.MessagesRequest =

Check warning on line 677 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L677

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand All @@ -685,9 +687,9 @@
<Tab title="JavaScript (User)">
```javascript
let UID = "UID";
let messageId = 1;

Check warning on line 690 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L690

Did you really mean 'messageId'?
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 692 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L692

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.setParentMessageId(messageId)
Expand All @@ -700,8 +702,8 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messageId: number = 1,

Check warning on line 705 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L705

Did you really mean 'messageId'?
messagesRequest: CometChat.MessagesRequest =

Check warning on line 706 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L706

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -714,9 +716,9 @@
<Tab title="JavaScript (Group)">
```javascript
let GUID = "GUID";
let messageId = 1;

Check warning on line 719 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L719

Did you really mean 'messageId'?
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 721 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L721

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.setParentMessageId(messageId)
Expand All @@ -738,7 +740,7 @@
```typescript
let UID: string = "UID",
limit: number = 50,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 743 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L743

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand All @@ -752,7 +754,7 @@
```javascript
let UID = "UID";
let limit = 50;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 757 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L757

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.setPinned(true)
Expand All @@ -765,7 +767,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 50,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 770 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L770

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -779,7 +781,7 @@
```javascript
let GUID = "GUID";
let limit = 50;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 784 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L784

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.setPinned(true)
Expand All @@ -800,7 +802,7 @@
<Tab title="TypeScript">
```typescript
let limit: number = 50,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 805 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L805

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setLimit(limit)
.setSaved(true)
Expand All @@ -812,7 +814,7 @@
<Tab title="JavaScript">
```javascript
let limit = 50;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 817 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L817

Did you really mean 'messagesRequest'?
.setLimit(limit)
.setSaved(true)
.build();
Expand All @@ -833,7 +835,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 838 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L838

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand All @@ -847,7 +849,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 852 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L852

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hideReplies(true)
Expand All @@ -860,7 +862,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 865 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L865

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -874,7 +876,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 879 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L879

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hideReplies(true)
Expand All @@ -893,7 +895,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 898 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L898

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand All @@ -907,7 +909,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 912 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L912

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hideDeletedMessages(true)
Expand All @@ -920,7 +922,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 925 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L925

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -934,7 +936,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 939 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L939

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hideDeletedMessages(true)
Expand All @@ -953,7 +955,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 958 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L958

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand All @@ -967,7 +969,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 972 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L972

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hideQuotedMessages(true)
Expand All @@ -980,7 +982,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 985 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L985

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -994,7 +996,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 999 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L999

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hideQuotedMessages(true)
Expand All @@ -1013,8 +1015,8 @@
```typescript
let UID: string = "UID",
limit: number = 30,
tags: Array<String> = ["starredMessage"],

Check warning on line 1018 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1018

Did you really mean 'starredMessage'?
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1019 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1019

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setUID(UID)
.setLimit(limit)
Expand All @@ -1028,8 +1030,8 @@
```javascript
let UID = "UID";
let limit = 30;
let tags = ["starredMessage"];

Check warning on line 1033 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1033

Did you really mean 'starredMessage'?
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1034 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1034

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.setTags(tags)
Expand All @@ -1042,8 +1044,8 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
tags: Array<String> = ["starredMessage"],

Check warning on line 1047 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1047

Did you really mean 'starredMessage'?
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1048 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1048

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1057,8 +1059,8 @@
```javascript
let GUID = "GUID";
let limit = 30;
let tags = ["starredMessage"];

Check warning on line 1062 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1062

Did you really mean 'starredMessage'?
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1063 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1063

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.setTags(tags)
Expand All @@ -1077,7 +1079,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1082 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1082

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1091,7 +1093,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1096 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1096

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.withTags(true)
Expand All @@ -1104,7 +1106,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1109 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1109

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1118,7 +1120,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1123 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1123

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.withTags(tags)
Expand All @@ -1136,6 +1138,8 @@

## Messages with links

<Note>With offline support on, this filter is answered by the server only; the cached page is empty.</Note>

Use `hasLinks(true)` to fetch only messages containing links. Default is `false`.

<Note>
Expand All @@ -1149,7 +1153,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1156 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1156

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1163,7 +1167,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1170 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1170

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hasLinks(true)
Expand All @@ -1176,7 +1180,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1183 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1183

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1190,7 +1194,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1197 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1197

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hasLinks(true)
Expand All @@ -1215,7 +1219,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1222 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1222

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1229,7 +1233,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1236 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1236

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hasAttachments(true)
Expand All @@ -1242,7 +1246,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1249 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1249

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1256,7 +1260,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1263 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1263

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hasAttachments(true)
Expand Down Expand Up @@ -1284,7 +1288,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1291 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1291

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1298,7 +1302,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1305 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1305

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hasReactions(true)
Expand All @@ -1311,7 +1315,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1318 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1318

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1325,7 +1329,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1332 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1332

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hasReactions(true)
Expand Down Expand Up @@ -1353,7 +1357,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1360 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1360

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1367,7 +1371,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1374 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1374

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.hasMentions(true)
Expand All @@ -1380,7 +1384,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1387 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1387

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1394,7 +1398,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1401 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1401

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.hasMentions(true)
Expand All @@ -1409,7 +1413,7 @@

## Messages with particular user mentions

Use `setMentionedUIDs()` with an array of UIDs to fetch messages that mention specific users.

Check warning on line 1416 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1416

Did you really mean 'UIDs'?

<Note>

Expand All @@ -1422,7 +1426,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1429 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1429

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1436,7 +1440,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1443 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1443

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.setMentionedUIDs(["UID"])
Expand All @@ -1449,7 +1453,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1456 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1456

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1463,7 +1467,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1470 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1470

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.setMentionedUIDs(["UID"])
Expand Down Expand Up @@ -1491,7 +1495,7 @@
```typescript
let UID: string = "UID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1498 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1498

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(UID)
.setLimit(limit)
Expand All @@ -1505,7 +1509,7 @@
```javascript
let UID = "UID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1512 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1512

Did you really mean 'messagesRequest'?
.setUID(UID)
.setLimit(limit)
.setAttachmentTypes([CometChat.AttachmentType.IMAGE, CometChat.AttachmentType.VIDEO])
Expand All @@ -1518,7 +1522,7 @@
```typescript
let GUID: string = "GUID",
limit: number = 30,
messagesRequest: CometChat.MessagesRequest =

Check warning on line 1525 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1525

Did you really mean 'messagesRequest'?
new CometChat.MessagesRequestBuilder()
.setGUID(GUID)
.setLimit(limit)
Expand All @@ -1532,7 +1536,7 @@
```javascript
let GUID = "GUID";
let limit = 30;
let messagesRequest = new CometChat.MessagesRequestBuilder()

Check warning on line 1539 in sdk/javascript/message-filtering.mdx

View check run for this annotation

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

sdk/javascript/message-filtering.mdx#L1539

Did you really mean 'messagesRequest'?
.setGUID(GUID)
.setLimit(limit)
.setAttachmentTypes([CometChat.AttachmentType.IMAGE, CometChat.AttachmentType.VIDEO])
Expand All @@ -1545,6 +1549,39 @@

The response contains media message objects filtered to the specified attachment types.


## Offline Behaviour

With offline support enabled, `fetchPrevious()` / `fetchNext()` accept a `MessageFetchListener` and answer from the on-device cache first (`onCachedMessages`, even when empty) and then from the server (`onServerMessages`). The cache answers a page **only when every filter on the request is locally computable**: a single server-only filter makes the cached page empty with no error, while the server phase still answers in full. Offline, the read ends with `onError` with code `FAILED_TO_FETCH` after the cached page. See [Show Cached Data](/sdk/javascript/offline-cached-data).

| Builder method | Offline behaviour |
| --- | --- |
| `setUnread()` | Cached |
| `hideMessagesFromBlockedUsers()` | Cached |
| `updatesOnly()` | Server only — cached page is empty |
| `setCategory()` / `setCategories()` | Cached |
| `setType()` / `setTypes()` | Cached |
| `setParentMessageId()` | Cached |
| `hideReplies()` | Cached |
| `hideDeletedMessages()` | Cached |
| `hideQuotedMessages()` | Cached |
| `setTags()` | Cached |
| `withTags()` | Cached |
| `hasLinks()` | Server only — cached page is empty |
| `setSearchKeyword()` | Server only — cached page is empty |
| `setInteractionGoalCompletedOnly()` | Server only — cached page is empty |
| `hasAttachments()` | Cached |
| `hasReactions()` | Cached |
| `setAttachmentTypes()` | Cached |
| `hasMentions()` | Cached |
| `setMentionedUIDs()` | Cached |
| `mentionsWithTagInfo()` / `mentionsWithBlockedInfo()` | Cached, without the tag or blocked info of the mentioned users |
| `setPinned()` / `setSaved()` | Answered from the pinned or saved list |

`setPinned` and `setSaved` are served from separate pinned and saved lists, not the message cache, so the other filters in this table do not apply to a pinned or saved read.

`setMessageId`, `setUpdatedAfter`, `setLimit`, `setUID` and `setGUID` are scope and paging inputs, not filters, and do not change what the cache can answer. Setting both `setUID` and `setGUID` together (one sender's messages in a group) is answered by the server only. A read with no UID, GUID or parent message id (a cross-conversation read) is answered from the cache only when it also uses `setUnread`, `hasAttachments`, `hasMentions`, `setAttachmentTypes`, mentions of only the logged-in user, or only the `call` and `custom` categories.

## Next Steps

<CardGroup cols={2}>
Expand Down
Loading