Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
Message
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Copy a message

A user can copy and send their own message in the same channel or to another channel. This works the same way for both open channels and group channels.

User message

await channel.copyUserMessage(TARGET_CHANNEL, MESSAGE_TO_COPY);

File message

await channel.copyFileMessage(TARGET_CHANNEL, MESSAGE_TO_COPY);

List of arguments

ArgumentTypeDescription

TARGET_CHANNEL

object

Specifies a target channel to send a copied message to.

MESSAGE_TO_COPY

object

Specifies a message to copy.