Renamed thumb
field in TgBotLib\Objects\Telegram > Animation
to thumbnail
https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
parent
007304c8ca
commit
4d3ba7004e
2 changed files with 7 additions and 6 deletions
|
@ -33,6 +33,7 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
|
|||
### Changed
|
||||
* 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`
|
||||
|
||||
## [6.5.2] - 2023-02-26
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/**
|
||||
* @var PhotoSize|null
|
||||
*/
|
||||
private $thumb;
|
||||
private $thumbnail;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
|
@ -105,13 +105,13 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Optional. Animation thumbnail as defined by sender
|
||||
* Optional. Animation thumbnailnail as defined by sender
|
||||
*
|
||||
* @return PhotoSize|null
|
||||
*/
|
||||
public function getThumb(): ?PhotoSize
|
||||
public function getThumbnail(): ?PhotoSize
|
||||
{
|
||||
return $this->thumb;
|
||||
return $this->thumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,7 @@
|
|||
'width' => $this->width ?? null,
|
||||
'height' => $this->height ?? null,
|
||||
'duration' => $this->duration ?? null,
|
||||
'thumb' => ($this->thumb instanceof ObjectTypeInterface) ? $this->thumb->toArray() : null,
|
||||
'thumbnail' => ($this->thumbnail instanceof ObjectTypeInterface) ? $this->thumbnail->toArray() : null,
|
||||
'file_name' => $this->file_name ?? null,
|
||||
'mime_type' => $this->mime_type ?? null,
|
||||
'file_size' => $this->file_size ?? null
|
||||
|
@ -181,7 +181,7 @@
|
|||
$object->width = $data['width'] ?? null;
|
||||
$object->height = $data['height'] ?? null;
|
||||
$object->duration = $data['duration'] ?? null;
|
||||
$object->thumb = ($data['thumb'] ?? null) ? PhotoSize::fromArray($data['thumb']) : null;
|
||||
$object->thumbnail = ($data['thumbnail'] ?? null) ? PhotoSize::fromArray($data['thumbnail']) : null;
|
||||
$object->file_name = $data['file_name'] ?? null;
|
||||
$object->mime_type = $data['mime_type'] ?? null;
|
||||
$object->file_size = $data['file_size'] ?? null;
|
||||
|
|
Loading…
Add table
Reference in a new issue