Skip to content

Forward Message

Forward existing messages to other chats.

Usage

The Message facade's forwardMessage method may be used to forward an existing message to another chat.

php
use NjoguAmos\Waha\Facades\Message;
use NjoguAmos\Waha\Dto\MessageForwardData;

$data = new MessageForwardData(
    chatId: '[email protected]',
    messageId: '[email protected]_AAAAAAAAAAAAAAAAAAAA',
);

/** @var \Saloon\Http\Response $response */
$response = Message::forwardMessage(data: $data);

Response

The response returned by the forwardMessage method is an instance of Saloon\Http\Response. You may use the json method to retrieve the response as an array:

php
/** @var \Saloon\Http\Response $response */

$response->status(); // 201
$response->json();   // ["id" => "[email protected]_BAE6A33293978B16", "timestamp" => 1629200000, ...]

Engines

WEBJSWPPNOWEBGOWS
✔️✔️✔️

References

Released under the MIT License.