Updated InputMessageContent objects
This commit is contained in:
parent
9dd11af87d
commit
aaacd8851e
5 changed files with 30 additions and 9 deletions
|
@ -159,10 +159,14 @@
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function fromArray(array $data): InputContactMessageContent
|
||||
public static function fromArray(?array $data): ?InputContactMessageContent
|
||||
{
|
||||
$object = new self();
|
||||
if($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$object = new self();
|
||||
$object->type = InputMessageContentType::CONTACT;
|
||||
$object->phone_number = $data['phone_number'] ?? null;
|
||||
$object->first_name = $data['first_name'] ?? null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue