diff --git a/CHANGELOG.md b/CHANGELOG.md index f19509b..31afc70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t * Removed unused `__destruct()` method from `\TgBotLib\Bot` * Added proper construction for `PollOption[]` objects in `TgBotLib\Objects\Telegram > Poll` * Renamed `thumb` field in `TgBotLib\Objects\Telegram > Animation` to `thumbnail` + * Renamed `thumb` field in `TgBotLib\Objects\Telegram > Audio` to `thumbnail` ## [6.5.2] - 2023-02-26 diff --git a/src/TgBotLib/Objects/Telegram/Audio.php b/src/TgBotLib/Objects/Telegram/Audio.php index 3bd02ca..11a7437 100644 --- a/src/TgBotLib/Objects/Telegram/Audio.php +++ b/src/TgBotLib/Objects/Telegram/Audio.php @@ -51,7 +51,7 @@ /** * @var PhotoSize|null */ - private $thumb; + private $thumbnail; /** * Identifier for this file, which can be used to download or reuse the file @@ -141,9 +141,9 @@ * * @return PhotoSize|null */ - public function getThumb(): ?PhotoSize + public function getThumbnail(): ?PhotoSize { - return $this->thumb; + return $this->thumbnail; } public function toArray(): array @@ -157,7 +157,7 @@ 'file_name' => $this->file_name ?? null, 'mime_type' => $this->mime_type ?? null, 'file_size' => $this->file_size ?? null, - 'thumb' => ($this->thumb instanceof ObjectTypeInterface) ? $this->thumb->toArray() : null, + 'thumbnail' => ($this->thumbnail instanceof ObjectTypeInterface) ? $this->thumbnail->toArray() : null, ]; } @@ -179,7 +179,7 @@ $object->file_name = $data['file_name'] ?? null; $object->mime_type = $data['mime_type'] ?? null; $object->file_size = $data['file_size'] ?? null; - $object->thumb = ($data['thumb'] ?? null) ? PhotoSize::fromArray($data['thumb']) : null; + $object->thumbnail = ($data['thumbnail'] ?? null) ? PhotoSize::fromArray($data['thumbnail']) : null; return $object; }