Added \TgBotLib\Objects\Telegram > Poll
This commit is contained in:
parent
85559ea360
commit
7be37db679
1 changed files with 10 additions and 1 deletions
|
@ -247,7 +247,6 @@
|
|||
|
||||
$object->id = $data['id'] ?? null;
|
||||
$object->question = $data['question'] ?? null;
|
||||
$object->options = $data['options'] ?? null;
|
||||
$object->total_voter_count = $data['total_voter_count'] ?? null;
|
||||
$object->is_closed = $data['is_closed'] ?? null;
|
||||
$object->is_anonymous = $data['is_anonymous'] ?? null;
|
||||
|
@ -268,6 +267,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
$object->options = null;
|
||||
if(isset($data['options']) && is_array($data['options']))
|
||||
{
|
||||
$object->options = [];
|
||||
foreach($data['options'] as $option)
|
||||
{
|
||||
$object->options[] = PollOption::fromArray($option);
|
||||
}
|
||||
}
|
||||
|
||||
return $object;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue