likeMessage(param)
Likes or unlikes a message.
Returns
Not applicable.
Parameters
Usage example
Name | Type | Description | Required |
param | object | The object that contains all the required data to like or unlike a specific message. | ✅ |
The following table contains the properties of the param object:
Name | Type | Description | Required |
pulseContext | string | The name of the application context or case context for which the feed must be fetched. | ✅ |
likedBy | boolean | The value that determines whether to like or unlike the message. | ✅ |
messageID | string | The ID of the message that needs to be liked or unliked. | ✅ |
isReply | boolean | The flag that determines whether the number of likes must be obtained for a message or a reply to a message. | ✅ |
c11nEnv | object | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API likes the message whose ID is W-103
.
PCore.getFeedUtils().likeMessage({pulseContext:'DATA-PORTAL', likedBy: 'likeFeedMessages', messageID:'W-103', isReply:'false', c11nEnv:'app/primary_1'})
.then(() => {
// success
}).catch(err => {
// errors
});
Previous topic getTagSuggestions(tagProps, c11nEnv) Next topic postMessage(pulseContext, message, attachmentIDs, isReply, c11nEnv)