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
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3195,6 +3195,7 @@
"group": "Messaging",
"pages": [
"sdk/javascript/send-message",
"sdk/javascript/upload-files",
"sdk/javascript/receive-message",
"sdk/javascript/card-messages",
"sdk/javascript/message-filtering",
Expand Down
17 changes: 16 additions & 1 deletion sdk/javascript/error-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
```

**Error categories:** Initialization, Login, Calling, Messages, Groups, Users, Conversations, Receipts, AI, Extensions
**Error categories:** Initialization, Login, Calling, Messages, Media Upload, Groups, Users, Conversations, Receipts, AI, Extensions
</Accordion>

Every error thrown by the CometChat SDK is a [`CometChatException`](/sdk/reference/auxiliary#cometchatexception) object with four properties:
Expand Down Expand Up @@ -83,7 +83,7 @@
| Code | Message |
|------|---------|
| `COMETCHAT_INITIALIZATION_NOT_DONE` | Please initialize CometChat before using the login method. |
| `USER_NOT_AUTHORISED` | The authToken of the user is not authorised. Please verify again. |

Check warning on line 86 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L86

Did you really mean 'authToken'?
| `AUTH_ERR_AUTH_TOKEN_NOT_FOUND` | The auth token does not exist. Please make sure you are logged in and have a valid auth token. |
| `LOGIN_IN_PROGRESS` | Please wait until the previous login request ends. |
| `WS_CONNECTION_FAIL` | WebSocket connection failed. |
Expand All @@ -110,9 +110,24 @@
|------|---------|
| `INVALID_RECEIVER_TYPE` | Receiver type can be `user` or `group`. |
| `REQUEST_IN_PROGRESS` | Request in progress. |
| `NOT_ENOUGH_PARAMETERS` | Timestamp, MessageId, or updatedAfter is required to use fetchNext(). |

Check warning on line 113 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L113

Did you really mean 'updatedAfter'?
| `INVALID_REASON_ID` | Invalid reasonId provided. |

Check warning on line 114 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L114

Did you really mean 'reasonId'?

## Media Upload Errors

Raised by the [Upload Files](/sdk/javascript/upload-files) flow — delivered through the `UploadFileListener` (`onFileError` / `onFileFailure`) — and by `sendMediaMessage()`. **Rejected** errors (`onFileError`) mean the input must change and are not retryable; **failed** errors (`onFileFailure`) are transient and can be retried with `retryAttachment()`.

Check warning on line 118 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L118

Did you really mean 'retryable'?

| Code | Surfaced via | Retryable | Message |

Check warning on line 120 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L120

Did you really mean 'Retryable'?
|------|--------------|-----------|---------|
| `ERR_INVALID_FILE_OBJECT` | `onFileError` | No | The provided file is invalid or its size cannot be determined. |
| `ERR_FILE_SIZE_EXCEEDED` | `onFileError` | No | The file `%s` exceeds the maximum allowed size of `%s` bytes. |
| `ERR_PERMISSION_DENIED` | `onFileError` | No | The sender does not have permission to upload media to the specified `receiverId` / `receiverType` (role/scope-based access control). |
| `ERR_BAD_REQUEST` | `onFileError` | No | The server rejected the presign request for this file (e.g. a corrupted or otherwise invalid file). |

Check warning on line 125 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L125

Did you really mean 'presign'?
| `ERR_FILE_COUNT_EXCEEDED` | `sendMediaMessage()` | No | The number of attachments exceeds the allowed limit of `%s`. |
| `ERR_S3_UPLOAD_FAILED` | `onFileFailure`, `onFileError` | Yes / No | Failed to upload the file to storage (`onFileFailure`, retryable); also the fallback when the server declines a file with no specific code (`onFileError`, not retryable). |

Check warning on line 127 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L127

Did you really mean 'retryable'?

Check warning on line 127 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L127

Did you really mean 'retryable'?
| `ERR_PRESIGNED_URL_EXPIRED` | `onFileFailure` | Yes | The pre-signed upload URL has expired. Please retry the upload. |
| `ERR_UPLOAD_STALLED` | `onFileFailure` | Yes | The upload stalled with no progress and was aborted. |

## User Errors

| Code | Message |
Expand All @@ -135,7 +150,7 @@
| Code | Message |
|------|---------|
| `INVALID_CONVERSATION_TYPE` | Conversation type can be `user` or `group`. |
| `CONVERSATION_NOT_FOUND` | Conversation not found. Check the value of conversationWith and conversationType. |

Check warning on line 153 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L153

Did you really mean 'conversationWith'?

Check warning on line 153 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L153

Did you really mean 'conversationType'?
| `ERR_CONVERSATION_NOT_ACCESSIBLE` | The conversation is not accessible to the requesting user. |

<Note>
Expand Down Expand Up @@ -205,9 +220,9 @@

| Code | Message |
|------|---------|
| `ERROR_INVALID_SESSIONID` | The provided sessionId cannot be null or empty. |

Check warning on line 223 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L223

Did you really mean 'sessionId'?
| `ERROR_INVALID_TYPE` | The provided type cannot be null or empty. |
| `ERROR_INVALID_GROUPLIST` | Grouplist cannot be null or empty. |

Check warning on line 225 in sdk/javascript/error-codes.mdx

View check run for this annotation

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

sdk/javascript/error-codes.mdx#L225

Did you really mean 'Grouplist'?

## General Errors

Expand Down
12 changes: 10 additions & 2 deletions sdk/javascript/send-message.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<Tab title="TypeScript (User)">
```typescript
let receiverID: string = "UID",
messageText: string = "Hello world!",

Check warning on line 23 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L23

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

Check warning on line 24 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L24

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

Check warning on line 25 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L25

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

Check warning on line 27 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L27

Did you really mean 'messageText'?
receiverType

Check warning on line 28 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L28

Did you really mean 'receiverType'?
);

CometChat.sendMessage(textMessage).then(
Expand Down Expand Up @@ -66,12 +66,12 @@
```javascript
try {
const receiverID = "UID";
const messageText = "Hello world!";

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

View check run for this annotation

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

sdk/javascript/send-message.mdx#L69

Did you really mean 'messageText'?
const receiverType = CometChat.RECEIVER_TYPE.USER;

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

View check run for this annotation

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

sdk/javascript/send-message.mdx#L70

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

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

View check run for this annotation

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

sdk/javascript/send-message.mdx#L71

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

Check warning on line 73 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L73

Did you really mean 'messageText'?
receiverType

Check warning on line 74 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L74

Did you really mean 'receiverType'?
);

const message = await CometChat.sendMessage(textMessage);
Expand Down Expand Up @@ -114,7 +114,7 @@
let textMessage = new CometChat.TextMessage(
receiverID,
messageText,
receiverType

Check warning on line 117 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L117

Did you really mean 'receiverType'?
);

CometChat.sendMessage(textMessage).then(
Expand Down Expand Up @@ -162,15 +162,15 @@
<Tab title="TypeScript (User)">
```typescript
let receiverID: string = "UID",
messageType: string = CometChat.MESSAGE_TYPE.IMAGE,

Check warning on line 165 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L165

Did you really mean 'messageType'?
receiverType: string = CometChat.RECEIVER_TYPE.USER,

Check warning on line 166 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L166

Did you really mean 'receiverType'?
file: File = (document.getElementById("img_file") as HTMLInputElement).files![0];

let mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(

Check warning on line 169 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L169

Did you really mean 'mediaMessage'?
receiverID,
file,
messageType,

Check warning on line 172 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L172

Did you really mean 'messageType'?
receiverType

Check warning on line 173 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L173

Did you really mean 'receiverType'?
);

CometChat.sendMediaMessage(mediaMessage).then(
Expand Down Expand Up @@ -214,15 +214,15 @@
<Tab title="TypeScript (Group)">
```typescript
let receiverID: string = "GUID",
messageType: string = CometChat.MESSAGE_TYPE.IMAGE,

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

View check run for this annotation

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

sdk/javascript/send-message.mdx#L217

Did you really mean 'messageType'?
receiverType: string = CometChat.RECEIVER_TYPE.GROUP,
file: File = (document.getElementById("img_file") as HTMLInputElement).files![0];

let mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(

Check warning on line 221 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L221

Did you really mean 'mediaMessage'?
receiverID,
file,
messageType,

Check warning on line 224 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L224

Did you really mean 'messageType'?
receiverType

Check warning on line 225 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L225

Did you really mean 'receiverType'?
);

CometChat.sendMediaMessage(mediaMessage).then(
Expand Down Expand Up @@ -273,12 +273,12 @@
<Tab title="TypeScript (User)">
```typescript
let receiverID: string = "UID",
messageType: string = CometChat.MESSAGE_TYPE.IMAGE,

Check warning on line 276 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L276

Did you really mean 'messageType'?
receiverType: string = CometChat.RECEIVER_TYPE.USER,
mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(

Check warning on line 278 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L278

Did you really mean 'mediaMessage'?
receiverID,
"",
messageType,

Check warning on line 281 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L281

Did you really mean 'messageType'?
receiverType
);

Expand Down Expand Up @@ -341,12 +341,12 @@
<Tab title="TypeScript (Group)">
```typescript
let receiverID: string = "GUID",
messageType: string = CometChat.MESSAGE_TYPE.IMAGE,

Check warning on line 344 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L344

Did you really mean 'messageType'?
receiverType: string = CometChat.RECEIVER_TYPE.GROUP,
mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(

Check warning on line 346 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L346

Did you really mean 'mediaMessage'?
receiverID,
"",
messageType,

Check warning on line 349 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L349

Did you really mean 'messageType'?
receiverType
);

Expand Down Expand Up @@ -428,7 +428,7 @@
```typescript mediaMessage.setCaption("Check out this photo!"); ```
</Tab>
<Tab title="JavaScript">
```javascript mediaMessage.setCaption("Check out this photo!"); ```

Check warning on line 431 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L431

Did you really mean 'mediaMessage'?
</Tab>
</Tabs>

Expand All @@ -446,9 +446,15 @@

## Multiple Attachments in a Media Message

Starting version 3.0.9 & above the SDK supports sending multiple attachments in a single media message. As in the case of a single attachment in a media message, there are two ways you can send Media Messages using the CometChat SDK:
The SDK supports sending multiple attachments in a single media message. A media message can carry up to a configurable maximum number of attachments (default **10**, controlled by the `file.count.max` app setting). `sendMediaMessage()` rejects with [`ERR_FILE_COUNT_EXCEEDED`](/sdk/javascript/error-codes#media-upload-errors) if you exceed it — read the current limit at runtime with `CometChat.getMaxAttachmentCount()`.

1. **By providing an array of files:** You can now share an array of files while creating an object of the MediaMessage class. When the media message is sent using the `sendMediaMessage()` method, the files are uploaded to the CometChat servers & the URL of the files is sent in the success response of the `sendMediaMessage()` method.
<Tip>
**Recommended: upload first, then send.** For a real composer — where you want a progress bar per file, and the ability to remove or retry individual files — create an upload request with [`CometChat.createUploadFileRequest()`](/sdk/javascript/upload-files), upload your files through it, then collect the resulting `Attachment`s (`request.getAttachments()`) and attach them here with `setAttachments()`. This decouples the (slow, cancellable) upload from the (instant) send. See [Upload Files & Send Attachments](/sdk/javascript/upload-files) for the full flow.
</Tip>

There are two ways to send a multi-attachment media message using the CometChat SDK:

1. **By providing an array of files:** You can share an array of files while creating an object of the MediaMessage class. When the media message is sent using the `sendMediaMessage()` method, the files are uploaded to the CometChat servers & the URL of the files is sent in the success response of the `sendMediaMessage()` method. This is the simplest path, but it gives no upload progress and no per-file cancel/retry — for that, [upload first](/sdk/javascript/upload-files).

Getting files:

Expand All @@ -465,7 +471,7 @@
const userType = CometChat.RECEIVER_TYPE.USER;
const mediaMessage = new MediaMessage(UID, files, fileType, userType);
</script>
</body>

Check warning on line 474 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L474

Did you really mean 'messageType'?
</html>
```

Expand All @@ -474,12 +480,12 @@
</Tabs>

<Tabs>
<Tab title="TypeScript (User)">

Check warning on line 483 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L483

Did you really mean 'receiverType'?
```typescript
let receiverID: string = "UID",
messageType: string = CometChat.MESSAGE_TYPE.FILE,
receiverType: string = CometChat.RECEIVER_TYPE.USER,
files: FileList = (document.getElementById("img_file") as HTMLInputElement).files!;

Check warning on line 488 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L488

Did you really mean 'messageType'?

Check warning on line 488 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L488

Did you really mean 'receiverType'?

let mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(
receiverID,
Expand Down Expand Up @@ -517,7 +523,7 @@
console.log("Media message sent successfully", message);
},
(error) => {
console.log("Media message sending failed with error", error);

Check warning on line 526 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L526

Did you really mean 'messageType'?
}
);
````
Expand All @@ -529,7 +535,7 @@
let receiverID: string = "GUID",
messageType: string = CometChat.MESSAGE_TYPE.FILE,
receiverType: string = CometChat.RECEIVER_TYPE.GROUP,
files: FileList = (document.getElementById("img_file") as HTMLInputElement).files!;

Check warning on line 538 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L538

Did you really mean 'messageType'?

Check warning on line 538 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L538

Did you really mean 'receiverType'?

let mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(
receiverID,
Expand Down Expand Up @@ -580,12 +586,14 @@

### Send Multiple URLs

Provide an array of [`Attachment`](/sdk/reference/auxiliary#attachment) objects that already point at hosted URLs. This is also the path the [upload-then-send flow](/sdk/javascript/upload-files) uses — the `Attachment`s from an upload request's `getAttachments()` are ready to pass straight to `setAttachments()`.

Check warning on line 589 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L589

Did you really mean 'messageType'?

<Tabs>
<Tab title="TypeScript (User)">
```typescript
let receiverID: string = "UID",
messageType: string = CometChat.MESSAGE_TYPE.IMAGE,
receiverType: string = CometChat.RECEIVER_TYPE.USER,

Check warning on line 596 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L596

Did you really mean 'messageType'?
mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(
receiverID,
"",
Expand Down Expand Up @@ -662,7 +670,7 @@
console.log("Media message sent successfully", message);
},
(error) => {
console.log("Media message sending failed with error", error);

Check warning on line 673 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L673

Did you really mean 'messageType'?
}
);
````
Expand All @@ -673,7 +681,7 @@
```typescript
let receiverID: string = "GUID",
messageType: string = CometChat.MESSAGE_TYPE.IMAGE,
receiverType: string = CometChat.RECEIVER_TYPE.GROUP,

Check warning on line 684 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L684

Did you really mean 'messageType'?
mediaMessage: CometChat.MediaMessage = new CometChat.MediaMessage(
receiverID,
"",
Expand Down Expand Up @@ -761,19 +769,19 @@

## Custom Message

Send structured data that doesn't fit text or media categories — like location coordinates, polls, or game moves.

Check warning on line 772 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L772

Did you really mean 'customData'?

<Tabs>
<Tab title="TypeScript (User)">
```typescript
let receiverID: string = "UID",

Check warning on line 777 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L777

Did you really mean 'customType'?
customData: Object = {
latitude: "50.6192171633316",
longitude: "-72.68182268750002",

Check warning on line 780 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L780

Did you really mean 'customMessage'?
},
customType: string = "location",
receiverType: string = CometChat.RECEIVER_TYPE.USER,

Check warning on line 783 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L783

Did you really mean 'customType'?
customMessage: CometChat.CustomMessage = new CometChat.CustomMessage(

Check warning on line 784 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L784

Did you really mean 'customData'?
receiverID,
receiverType,
customType,
Expand Down Expand Up @@ -814,7 +822,7 @@
console.log("Custom message sent successfully", message);
},
(error) => {
console.log("Custom message sending failed with error", error);

Check warning on line 825 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L825

Did you really mean 'customData'?
}
);
````
Expand All @@ -823,14 +831,14 @@

<Tab title="TypeScript (Group)">
```typescript
let receiverID: string = "GUID",

Check warning on line 834 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L834

Did you really mean 'customType'?
customData: Object = {
latitude: "50.6192171633316",
longitude: "-72.68182268750002",

Check warning on line 837 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L837

Did you really mean 'customMessage'?
},
customType: string = "location",
receiverType: string = CometChat.RECEIVER_TYPE.GROUP,

Check warning on line 840 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L840

Did you really mean 'customType'?
customMessage: CometChat.CustomMessage = new CometChat.CustomMessage(

Check warning on line 841 in sdk/javascript/send-message.mdx

View check run for this annotation

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

sdk/javascript/send-message.mdx#L841

Did you really mean 'customData'?
receiverID,
receiverType,
customType,
Expand Down
Loading