From 377b266d7b855ec294a33b0e242c3793a5a90cb5 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 5 Feb 2020 18:47:36 +0100 Subject: [PATCH] Bugfix --- src/danog/MadelineProto/MTProtoSession/CallHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/MTProtoSession/CallHandler.php b/src/danog/MadelineProto/MTProtoSession/CallHandler.php index d56bece6a..fd92dee7c 100644 --- a/src/danog/MadelineProto/MTProtoSession/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoSession/CallHandler.php @@ -51,7 +51,7 @@ trait CallHandler foreach ($message_ids as $message_id) { if (isset($this->outgoing_messages[$message_id]['body'])) { if ($datacenter) { - $res = $this->API->datacenter->waitGetConnection($datacenter)->onResolve(function ($e, $r) use ($message_id) { + $res = Tools::call($this->API->datacenter->waitGetConnection($datacenter))->onResolve(function ($e, $r) use ($message_id) { return $r->sendMessage($this->outgoing_messages[$message_id], false); }); } else {