Skip to content

Send Reaction

Send a reaction to a message.

Usage

The Message facade's sendReaction method may be used to send a reaction to a message.

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

$data = new MessageReactionData(
    chatId: '123456789@c.us',
    messageId: 'true_123456789@c.us_BAE6A33293978B16',
    reaction: '👍',
);

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

Response

The response returned by the sendReaction 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" => "false_123456789@c.us_BAE6A33293978B16", "timestamp" => 1629200000, ...]

Engines

WEBJSWPPNOWEBGOWS
✔️✔️✔️✔️

References

Released under the MIT License.