Renamed thumb
field in TgBotLib\Objects\Telegram > Video
to thumbnail
https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
parent
70c6181cd8
commit
da8108c196
2 changed files with 6 additions and 5 deletions
|
@ -37,6 +37,7 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
|
|||
* Renamed `thumb` field in `TgBotLib\Objects\Telegram > Audio` to `thumbnail`
|
||||
* 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`
|
||||
|
||||
## Fixed
|
||||
* Fixed `TgBotLib\Objects\Telegram > Sticker > toArray()` to properly return the `premium_animation` field
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/**
|
||||
* @var PhotoSize|null
|
||||
*/
|
||||
private $thumb;
|
||||
private $thumbnail;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
|
@ -107,9 +107,9 @@
|
|||
*
|
||||
* @return PhotoSize|null
|
||||
*/
|
||||
public function getThumb(): ?PhotoSize
|
||||
public function getThumbnail(): ?PhotoSize
|
||||
{
|
||||
return $this->thumb;
|
||||
return $this->thumbnail;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -157,7 +157,7 @@
|
|||
'width' => $this->width,
|
||||
'height' => $this->height,
|
||||
'duration' => $this->duration,
|
||||
'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,
|
||||
|
@ -179,7 +179,7 @@
|
|||
$object->width = $data['width'];
|
||||
$object->height = $data['height'];
|
||||
$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_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