messages.forwardToConversation()

This method allows you to forward a message to a Conversation with or without priority.

Definition

client.messages.forwardToConversation(
messageId: string|Object,
conversationId: string,
options: ?Object
)

Parameters

ParameterTypeDescription
messageIdstring|MessageA message ID or message object that is to be forwarded
conversationIdstringConversation ID where that message should be forwarded
options?ObjectOptions (described below)

Options

ParameterTypeDescription
priority?stringIndicates priority level of message. Values: NORMAL (default), or HIGH
senderId?stringID of the user who is forwarding the message, default is current user

Returns

An error will be thrown if the messageId or conversationId are invalid.

Otherwise, once the returned Promise is resolved, you will have a newly forwarded Message.

Example

Forward to conversation with normal priority:

const forwardedMessage = await client.messages.forwardToConversation(
'some-message-id',
'some-conversation-id-to-forward-to',
{
priority: client.enums.MessagePriority.NORMAL
}
);
console.log(
'forwarded message to', forwardedMessage.counterParty.name,
'with priority of', forwardedMessage.priority,
'original message from', forwardedMessage.originalSender.name
);