Message Actions API for Unreal SDK
Add or remove actions on published messages to build features like receipts, reactions, or to associate custom metadata to messages. Clients can subscribe to a channel to receive message action events on that channel. They can also fetch past message actions from Message Persistence independently or when they fetch original messages.
Reactions
"Message Reactions" is a specific application of the Message Actions API for emoji or social reactions.
Message Actions vs. Message Reactions
Message Actions is the flexible, low-level API for adding any metadata to messages (read receipts, delivery confirmations, custom data), while Message Reactions specifically refers to using Message Actions for emoji/social reactions.
In PubNub Core and Chat SDKs, the same underlying Message Actions API is referred to as Message Reactions when used for emoji reactions - it's the same functionality, just different terminology depending on the use case.
Add message action
Requires Message Persistence
This method requires that Message Persistence is enabled for your key in the Admin Portal.
Add an action to a published message.
Method(s)
1PubnubSubsystem->AddMessageAction(
2 FString Channel,
3 FString MessageTimeToken,
4 FString ActionType,
5 FString Value,
6 FOnAddMessageActionsResponse OnAddMessageActionResponse
7);
| Parameter | Description |
|---|---|
Channel *Type: FString | Channel to publish the message action to. |
MessageTimeToken *Type: FString | Timetoken of the published message to apply the action to. |
ActionType *Type: FString | Message action type. |
Value *Type: FString | Message action value. |
OnAddMessageActionResponse * | Delegate for the operation result. You can also use a native callback of the type FOnAddMessageActionsResponseNative to handle the result using a lambda. |
Sample code
Reference code
ACTION REQUIRED before running the code.