mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-22 09:22:04 +00:00
28 lines
845 B
PHP
28 lines
845 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace BushlanovDev\MaxMessengerBot\Models;
|
|
|
|
use BushlanovDev\MaxMessengerBot\Enums\MessageLinkType;
|
|
|
|
/**
|
|
* Represents a forwarded or replied message linked to the main message.
|
|
*/
|
|
final readonly class LinkedMessage extends AbstractModel
|
|
{
|
|
/**
|
|
* @param MessageLinkType $type Type of linked message (forward or reply).
|
|
* @param MessageBody $message The body of the original message.
|
|
* @param User|null $sender The sender of the original message. Can be null if posted on behalf of a channel.
|
|
* @param int|null $chatId The chat where the message was originally posted (for forwarded messages).
|
|
*/
|
|
public function __construct(
|
|
public MessageLinkType $type,
|
|
public MessageBody $message,
|
|
public ?User $sender,
|
|
public ?int $chatId,
|
|
) {
|
|
}
|
|
}
|