/ SDKs / Unreal
SDKs
Chat SDKs Unreal v3
Chat SDKs Unreal
Chat SDKs
Unreal
Version 3

Categorize messages by custom type

Copy link

When sending a message, you can specify a custom message type to subclassify messages. This custom type takes on the form of a std::wstring, and can be useful in searching or filtering messages.

The data and custom_type properties of a message object allow you to append information to your messages. While both properties can be used flexibly, common examples for the custom_type include categorizing message groups into Notes or Contacts.

To embed a custom type into your message, pass a std::wstring value as an argument to the parameter in the SendUserMessage() or SendFileMessage() method.

Open channelGroup channel
openChannel->SendUserMessage(SBDUserMessageParams().SetMessage(MESSAGE).SetData(DATA).SetCustomType(CUSTOM_TYPE)), [](SBDUserMessage* user_message, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});

The custom_type property contains the message's custom type.