/ SDKs / Unity
SDKs
Chat SDKs Unity v4
Chat SDKs Unity
Chat SDKs
Unity
Version 4

Copy a message

Copy link

A user can copy and send their own message in the same channel or to another channel. Both user messages and file messages can be copied using the CopyUserMessage() or CopyFileMessage() method.

channel.CopyUserMessage(USER_MESSAGE_TO_COPY, TARGET_CHANNEL, (inUserMessage, inError) =>
{
    if (inError != null)
    {
        return; // Handle error.
    }

    // The message is successfully copied to the target channel.
});
        
channel.CopyFileMessage(FILE_MESSAGE_TO_COPY, TARGET_CHANNEL, (inFileMessage, inError) => 
{
    if (inError != null)
    {
        return; // Handle error.
    }
            
    // The message is successfully copied to the target channel.
});

List of parameters

Copy link
Parameter nameTypeDescription

inUserMessage

SbUserMessage

Specifies a user message to copy.

inFileMessage

SbFileMessage

Specifies a file message to copy.

inToTargetChannel

SbBaseChannel

Specifies a target channel to send a copied message to.

inCompletionHandler

SbUserMessageHandler

Specifies the callback handler to receive the response from Sendbird server for a message copy request.