Renamed thumb
field in TgBotLib\Objects\Telegram > VideoNote
to thumbnail
https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
parent
da8108c196
commit
97fe1f33ad
2 changed files with 6 additions and 5 deletions
|
@ -38,6 +38,7 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
|
|||
* Renamed `thumb` field in `TgBotLib\Objects\Telegram > Document` to `thumbnail`
|
||||
* Renamed `thumb` field in `TgBotLib\Objects\Telegram > Sticker` to `thumbnail`
|
||||
* Renamed `thumb` field in `TgBotLib\Objects\Telegram > Video` to `thumbnail`
|
||||
* Renamed `thumb` field in `TgBotLib\Objects\Telegram > VideoNote` to `thumbnail`
|
||||
|
||||
## Fixed
|
||||
* Fixed `TgBotLib\Objects\Telegram > Sticker > toArray()` to properly return the `premium_animation` field
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/**
|
||||
* @var PhotoSize|null
|
||||
*/
|
||||
private $thumb;
|
||||
private $thumbnail;
|
||||
|
||||
/**
|
||||
* @var int|null
|
||||
|
@ -82,9 +82,9 @@
|
|||
*
|
||||
* @return PhotoSize|null
|
||||
*/
|
||||
public function getThumb(): ?PhotoSize
|
||||
public function getThumbnail(): ?PhotoSize
|
||||
{
|
||||
return $this->thumb;
|
||||
return $this->thumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +109,7 @@
|
|||
'file_unique_id' => $this->file_unique_id,
|
||||
'length' => $this->length,
|
||||
'duration' => $this->duration,
|
||||
'thumb' => ($this->thumb instanceof ObjectTypeInterface) ? $this->thumb->toArray() : $this->thumb,
|
||||
'thumbnail' => ($this->thumbnail instanceof ObjectTypeInterface) ? $this->thumbnail->toArray() : $this->thumbnail,
|
||||
'file_size' => $this->file_size,
|
||||
];
|
||||
}
|
||||
|
@ -128,7 +128,7 @@
|
|||
$object->file_unique_id = $data['file_unique_id'];
|
||||
$object->length = $data['length'];
|
||||
$object->duration = $data['duration'];
|
||||
$object->thumb = (isset($data['thumb'])) ? PhotoSize::fromArray($data['thumb']) : null;
|
||||
$object->thumbnail = (isset($data['thumbnail'])) ? PhotoSize::fromArray($data['thumbnail']) : null;
|
||||
$object->file_size = $data['file_size'];
|
||||
|
||||
return $object;
|
||||
|
|
Loading…
Add table
Reference in a new issue