mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 07:38:58 +01:00
Improve multi logic
This commit is contained in:
parent
36495bffe9
commit
17bacd1389
@ -135,12 +135,12 @@ trait CallHandler
|
|||||||
unset($args['multiple']);
|
unset($args['multiple']);
|
||||||
}
|
}
|
||||||
foreach ($args as $single_args) {
|
foreach ($args as $single_args) {
|
||||||
$promises[] = yield from $this->methodCallAsyncWrite($method, $single_args, $new_aargs);
|
$promises[] = Tools::call($this->methodCallAsyncWrite($method, $single_args, $new_aargs));
|
||||||
}
|
}
|
||||||
if (!isset($aargs['postpone'])) {
|
if (!isset($aargs['postpone'])) {
|
||||||
$this->writer->resume();
|
$this->writer->resume();
|
||||||
}
|
}
|
||||||
return $promises;
|
return yield Tools::all($promises);
|
||||||
}
|
}
|
||||||
$args = (yield from $this->API->botAPIToMTProto($args));
|
$args = (yield from $this->API->botAPIToMTProto($args));
|
||||||
if (isset($args['ping_id']) && \is_int($args['ping_id'])) {
|
if (isset($args['ping_id']) && \is_int($args['ping_id'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user