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
Parameter | Type | Description |
---|---|---|
messageId | string |Message | A message ID or message object that is to be forwarded |
conversationId | string | Conversation ID where that message should be forwarded |
options | ?Object | Options (described below) |
Options
Parameter | Type | Description |
---|---|---|
priority | ?string | Indicates priority level of message. Values: NORMAL (default), or HIGH |
senderId | ?string | ID 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);