Updated Messages

This commit is contained in:
netkas 2024-10-04 21:21:30 -04:00
parent 6280b8c026
commit 4558409da5
3 changed files with 18 additions and 5 deletions

View file

@ -1088,10 +1088,14 @@
/**
* @inheritDoc
*/
public static function fromArray(array $data): Message
public static function fromArray(?array $data): ?Message
{
$object = new self();
if($data === null)
{
return null;
}
$object = new self();
$object->message_id = $data['message_id'];
$object->message_thread_id = $data['message_thread_id'] ?? null;
$object->from = isset($data['from']) ? User::fromArray($data['from']) : null;