SDKsAndroid
Create a forwarded message
Use createForwardMessage to create a forwarded copy of a message.
Wrap an existing historical message into a new forwarded message object. The SDK clones the original message payload and resets its delivery state to pending, making it ready to forward to another conversation.
Code example
Message message = OpenIMClient.getInstance().messageManager.createForwardMessage(sourceMessage);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message | Message | Yes | The original historical Message object to forward. |
Return value
Returns a new Message object cloned from the source message and prepared for forwarding.
State changes after the call
- Local initialization: Initializes the local cloned
Messagestructure without sending data to the server. - Transmission: Call Send a message to forward the message to a new recipient or group. To forward multiple messages as a single bundle, see Create a merged message.
Was this page helpful?