Chat / Unreal
Current version: v3
Chat Unreal v3
Chat Unreal
Chat
Unreal
Home
/
Chat
/
Unreal
/
Messages

Mention other participants or members

When a participant or a member wants to call the attention of other participants or members in a channel, they are able to mention others in a message by following the steps below:

  1. Specify a list of the user IDs to mention.
  2. Add the list to SBDUserMessageParams which may contain options for further action.
  3. Pass the params to SendUserMessage().
  4. Only up to 10 participants or members who are mentioned will be notified through SBDChannelHandler's MentionReceived().
Open channelGroup channel
std::vector<std::wstring> userIDsToMention;
userIDsToMention.push_back(L"Jane");
userIDsToMention.push_back(L"Julia");
userIDsToMention.push_back(L"Tyler");

SBDUserMessageParams params = SBDUserMessageParams()
        .SetMessage(MESSAGE)
        .SetMentionedUserIds(userIDsToMention);

openChannel->SendUserMessage(params, [](SBDUserMessage* userMessage, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});