This commit is contained in:
giuseppeM99 2017-08-23 21:59:29 +02:00 committed by Daniil Gentili
parent 5dfc160f1d
commit 057db34af3
2 changed files with 6 additions and 3 deletions

View File

@ -46,14 +46,16 @@ class Lua
}
$methods = [];
foreach ($this->MadelineProto->get_methods_namespaced() as $pair) {
list($namespace, $method) = $pair;
$namespace = key($pair);
$method = $pair[$namespace];
if ($namespace === 'upload') {
continue;
}
$methods[$namespace][$method] = [$this->MadelineProto->{$namespace}, $method];
}
foreach ($this->MadelineProto->get_methods_namespaced() as $pair) {
list($namespace, $method) = $pair;
$namespace = key($pair);
$method = $pair[$namespace];
if ($namespace === 'upload') {
continue;
}
@ -61,6 +63,7 @@ class Lua
}
$this->MadelineProto->lua = true;
foreach ($this->MadelineProto->get_methods_namespaced() as $method => $namespace) {
$namespace = key($pair);
$this->MadelineProto->{$namespace}->lua = true;
}
}

View File

@ -220,7 +220,7 @@ trait TL
{
$res = [];
foreach ($this->methods->method_namespace as $pair) {
list($a, $b) = $pair;
$a = key($pair);
$res[$a] = $a;
}