Skip to content

Send Seen

Send a read receipt (double green tick) for messages in a chat.

Usage

The Message facade's sendSeen method may be used to send a read receipt (double green tick) for messages in a chat.

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

$data = new SeenData(
    chatId: '[email protected]',
);

/** @var \Saloon\Http\Response $response */
$response = Message::sendSeen(data: $data);
php
use NjoguAmos\Waha\Facades\Message;
use NjoguAmos\Waha\Dto\SeenData;

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

/** @var \Saloon\Http\Response $response */
$response = Message::sendSeen(data: $data);
php
use NjoguAmos\Waha\Facades\Message;
use NjoguAmos\Waha\Dto\SeenData;

$data = new SeenData(
    chatId: '[email protected]',
    messageIds: ['[email protected][email protected]'],
    participant: '[email protected]',
);

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

Response

The response returned by the sendSeen 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();   // ["status" => "success", ...]

Engines

WEBJSWPPNOWEBGOWS
✔️✔️✔️✔️

References

Released under the MIT License.