From 17bacd1389f090fd5a83cf04ff9018dda1bbaf5e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 6 Feb 2020 02:44:00 +0100 Subject: [PATCH] Improve multi logic --- src/danog/MadelineProto/MTProtoSession/CallHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoSession/CallHandler.php b/src/danog/MadelineProto/MTProtoSession/CallHandler.php index 8876539a7..3419b6820 100644 --- a/src/danog/MadelineProto/MTProtoSession/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoSession/CallHandler.php @@ -135,12 +135,12 @@ trait CallHandler unset($args['multiple']); } 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'])) { $this->writer->resume(); } - return $promises; + return yield Tools::all($promises); } $args = (yield from $this->API->botAPIToMTProto($args)); if (isset($args['ping_id']) && \is_int($args['ping_id'])) {