From 7b2798ddd930a6a00cf46ab5aa19dfab6ede9dac Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 23 Dec 2017 14:33:37 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/MTProto.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 1397df32..ca5f92d1 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -549,10 +549,10 @@ class MTProto 'gzip_encode_if_gt' => 500, // Should I try using gzip encoding for requests bigger than N bytes? Set to -1 to disable. ], 'updates' => [ - 'handle_updates' => true, // Should I handle updates? - 'handle_old_updates' => true, // Should I handle old updates on startup? + 'handle_updates' => true, // Should I handle updates? + 'handle_old_updates' => true, // Should I handle old updates on startup? 'getdifference_interval' => 30, // Getdifference manual polling interval - 'callback' => 'get_updates_update_handler', // A callable function that will be called every time an update is received, must accept an array (for the update) as the only parameter + 'callback' => 'get_updates_update_handler', // A callable function that will be called every time an update is received, must accept an array (for the update) as the only parameter ], 'secret_chats' => [ 'accept_chats' => true, // Should I accept secret chats? Can be true, false or on array of user ids from which to accept chats @@ -704,7 +704,9 @@ class MTProto $socket->authorized = true; break; } catch (\danog\MadelineProto\RPCErrorException $e) { - if ($e->rpc === 'DC_ID_INVALID') break; + if ($e->rpc === 'DC_ID_INVALID') { + break; + } \danog\MadelineProto\Logger::log(['Failure while syncing authorization from DC '.$authorized_dc_id.' to DC '.$id.': '.$e->getMessage()], \danog\MadelineProto\Logger::ERROR); } // Turns out this DC isn't authorized after all }