CardMessage class is used to create a card message for CometChat. It extends the InteractiveMessage class from CometChat.
Constructor
| Name | Type | Description |
|---|---|---|
| receiverId | string | The ID of the receiver |
| receiverType | string | The type of the receiver |
| text | string | The text to be displayed on the card |
| cardActions | ButtonElement | The actions to be performed when the card is interacted with |
Class Usage
How to create an instance of theCardMessage class:
- TypeScript
Key Properties and Methods
Image Url
ThesetImageUrl() method allows to set the image URL for the card.
- TypeScript
Example
Below is an example that showcases the creation and manipulation of an instance ofCardMessage:
- TypeScript