On this page

Forward messages

Forward messages between channels to share information or facilitate collaboration.

Use Forward() on a message object or ForwardMessage() on a channel object. Both produce the same result with different input parameters.

Additional info in the forwarded message

Forwarded messages include originalPublisher (original sender's user ID) and originalChannelId (source channel ID).

Method signature

These methods take the following parameters:

  • Forward()

    1message.Forward(string channelId)
  • ForwardMessage()

    1channel.ForwardMessage(Message message)

Input

ParameterRequired in Forward()Required in ForwardMessage()Description
channelId
Type: string
Default:
n/a
Yes
No
Unique identifier of the channel to which you want to forward the message. You can forward a message to the same channel on which it was published or to any other.
message
Type: Message
Default:
n/a
No
Yes
Message object that you want to forward to the selected channel.

Output

An awaitable Task.

Sample code

Forward a message from the support channel to the incident-management channel.

  • Forward()

    1
    
  • ForwardMessage()

    1
    
Last updated on