|
12 | 12 | namespace Longman\TelegramBot\Entities;
|
13 | 13 |
|
14 | 14 | use Longman\TelegramBot\Entities\Games\Game;
|
| 15 | +use Longman\TelegramBot\Entities\Message\Factory as MaybeInaccessibleMessageFactory; |
| 16 | +use Longman\TelegramBot\Entities\Message\MaybeInaccessibleMessage; |
15 | 17 | use Longman\TelegramBot\Entities\MessageOrigin\Factory as MessageOriginFactory;
|
16 | 18 | use Longman\TelegramBot\Entities\MessageOrigin\MessageOrigin;
|
17 | 19 | use Longman\TelegramBot\Entities\Payments\Invoice;
|
|
79 | 81 | * @method bool getChannelChatCreated() Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
|
80 | 82 | * @method int getMigrateToChatId() Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
|
81 | 83 | * @method int getMigrateFromChatId() Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
|
82 |
| - * @method Message getPinnedMessage() Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. |
| 84 | + * @method MaybeInaccessibleMessage getPinnedMessage() Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. |
83 | 85 | * @method Invoice getInvoice() Optional. Message is an invoice for a payment, information about the invoice.
|
84 | 86 | * @method SuccessfulPayment getSuccessfulPayment() Optional. Message is a service message about a successful payment, information about the payment.
|
85 | 87 | * @method UsersShared getUsersShared() Optional. Service message: users were shared with the bot
|
|
101 | 103 | * @method WebAppData getWebAppData() Optional. Service message: data sent by a Web App
|
102 | 104 | * @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
|
103 | 105 | */
|
104 |
| -class Message extends Entity |
| 106 | +class Message extends Entity implements MaybeInaccessibleMessage |
105 | 107 | {
|
106 | 108 | /**
|
107 | 109 | * {@inheritdoc}
|
@@ -139,7 +141,7 @@ protected function subEntities(): array
|
139 | 141 | 'left_chat_member' => User::class,
|
140 | 142 | 'new_chat_photo' => [PhotoSize::class],
|
141 | 143 | 'message_auto_delete_timer_changed' => MessageAutoDeleteTimerChanged::class,
|
142 |
| - 'pinned_message' => __CLASS__, |
| 144 | + 'pinned_message' => MaybeInaccessibleMessageFactory::class, |
143 | 145 | 'invoice' => Invoice::class,
|
144 | 146 | 'successful_payment' => SuccessfulPayment::class,
|
145 | 147 | 'users_shared' => UsersShared::class,
|
|
0 commit comments