This commit is contained in:
Daniil Gentili 2017-10-09 14:22:16 +03:00
commit 4e52420851
2 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,7 @@ class API extends APIFactory
public function serialize($filename)
{
Logger::log([\danog\MadelineProto\Lang::$current_lang['serializing_madelineproto']]);
return Serialization::serialize($filename, $this);
}
}

View File

@ -138,6 +138,7 @@ class APIFactory
if ($this->lua === false) {
return method_exists($this->API, $this->namespace.$name) ? $this->API->{$this->namespace.$name}(...$arguments) : $this->API->method_call($this->namespace.$name, (isset($arguments[0]) && is_array($arguments[0])) ? $arguments[0] : [], $aargs);
}
try {
$deserialized = method_exists($this->API, $this->namespace.$name) ? $this->API->{$this->namespace.$name}(...$arguments) : $this->API->method_call($this->namespace.$name, (isset($arguments[0]) && is_array($arguments[0])) ? $arguments[0] : [], $aargs);
Lua::convert_objects($deserialized);