diff --git a/src/TgBotLib/Objects/VideoChatParticipantsInvited.php b/src/TgBotLib/Objects/VideoChatParticipantsInvited.php new file mode 100644 index 0000000..bba8536 --- /dev/null +++ b/src/TgBotLib/Objects/VideoChatParticipantsInvited.php @@ -0,0 +1,45 @@ + array_map(function (User $user) { + return $user->toArray(); + }, $this->users), + ]; + } + + /** + * Constructs object from an array representation + * + * @param array $data + * @return ObjectTypeInterface + */ + public static function fromArray(array $data): ObjectTypeInterface + { + $object = new self(); + $object->users = array_map(function (array $user) { + return User::fromArray($user); + }, $data['users']); + return $object; + } + } \ No newline at end of file