Extension settings
- Login to CometChat and select your app.
- Go to the Extensions section and enable the Pin message extension.
How does it work?
Pin message extension provides you the ability to:- Pin messages
- Unpin messages
- Fetch all the pinned messages for a conversation.
1. Pin a message
To pin a message, use thecallExtension
method provided by the SDK to make an HTTP POST request with the parameters as shown below. You need to pass the msgId
that has to be pinned.
2. Unpin a message
To unpin a message, use thecallExtension
method provided by the SDK to make an HTTP DELETE request with the parameters as shown below. You need to pass the msgId
, receiverType
and the receiver
(can be either UID or GUID based on receiverType
).
3. Fetch pinned messages
To fetch the pinned messages for a conversation, use thecallExtension
method provided by the SDK to make an HTTP GET request with the query parameters as shown below. You need to pass the receiverType
and the receiver
(can be either UID or GUID based on receiverType
).