Refactor array handling and InputMedia class structure

This commit is contained in:
netkas 2024-10-03 21:31:04 -04:00
parent 3ed338d49a
commit 9dd11af87d
11 changed files with 56 additions and 339 deletions

View file

@ -372,7 +372,7 @@
$object->title = $data['title'] ?? null;
$object->caption = $data['caption'] ?? null;
$object->parse_mode = $data['parse_mode'] ?? null;
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities']) : null;
$object->caption_entities = isset($data['caption_entities']) ? array_map(fn(array $items) => MessageEntity::fromArray($items), $data['caption_entities'] ?? []) : null;
$object->video_width = $data['video_width'] ?? null;
$object->video_height = $data['video_height'] ?? null;
$object->video_duration = $data['video_duration'] ?? null;