namespace fix

This commit is contained in:
danogentili 2017-08-23 15:36:10 +03:00
parent c791f2bf31
commit 76fc5b9203
2 changed files with 5 additions and 3 deletions

View File

@ -45,13 +45,15 @@ class Lua
$this->Lua->registerCallback($method, [$this->MadelineProto->API, $method]);
}
$methods = [];
foreach ($this->MadelineProto->get_methods_namespaced() as $method => $namespace) {
foreach ($this->MadelineProto->get_methods_namespaced() as $pair) {
list($namespace, $method) = $pair;
if ($namespace === 'upload') {
continue;
}
$methods[$namespace][$method] = [$this->MadelineProto->{$namespace}, $method];
}
foreach ($this->MadelineProto->get_method_namespaces() as $namespace) {
foreach ($this->MadelineProto->get_methods_namespaced() as $pair) {
list($namespace, $method) = $pair;
if ($namespace === 'upload') {
continue;
}

View File

@ -33,7 +33,7 @@ class TLMethod extends \Volatile
$namespace = explode('.', $json_dict['method']);
if (isset($namespace[1])) {
$this->method_namespace[$namespace[1]] = $namespace[0];
$this->method_namespace[] = [$namespace[0] => $namespace[1]];
}
$this->parse_params($json_dict['id']);