Updated InputMessageContent objects

This commit is contained in:
netkas 2024-10-04 00:14:47 -04:00
parent 9dd11af87d
commit aaacd8851e
5 changed files with 30 additions and 9 deletions

View file

@ -227,8 +227,13 @@
/**
* @inheritDoc
*/
public static function fromArray(array $data): InputVenueMessageContent
public static function fromArray(?array $data): ?InputVenueMessageContent
{
if($data === null)
{
return null;
}
$object = new self();
$object->type = InputMessageContentType::VENUE;
$object->latitude = (float)$data['latitude'] ?? null;