For AI agents: this page in Markdown: https://www.pubnub.com/docs/chat/unity-chat-sdk/build/features/messages/forward.md. Documentation index: https://www.pubnub.com/llms-full.txt.
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
channelId#- 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.
- Required in Forward()
- Yes
- Required in ForwardMessage()
- No
message#Messageobject that you want to forward to the selected channel.- Required in Forward()
- No
- Required in ForwardMessage()
- Yes