This commit is contained in:
Daniil Gentili 2017-11-09 11:31:11 +00:00
parent 983d70a402
commit b3d9b1f07c
3 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class APIFactory
$this->API->get_config([], ['datacenter' => $this->API->datacenter->curdc]); $this->API->get_config([], ['datacenter' => $this->API->datacenter->curdc]);
$aargs = isset($arguments[1]) && is_array($arguments[1]) ? $arguments[1] : []; $aargs = isset($arguments[1]) && is_array($arguments[1]) ? $arguments[1] : [];
$aargs['datacenter'] = $this->API->datacenter->curdc; $aargs['datacenter'] = $this->API->datacenter->curdc;
if ($name === 'get_updates' && isset($this->session) && !is_null($this->session) && time() - $this->serialized > 10) { if ($name === 'get_updates' && isset($this->session) && !is_null($this->session) && time() - $this->serialized > 30) {
$this->serialize($this->session); $this->serialize($this->session);
Logger::log(["Didn't serialize in a while, doing that now..."]); Logger::log(["Didn't serialize in a while, doing that now..."]);
} }

View File

@ -85,6 +85,7 @@ trait UpdateHandler
if ($e->rpc !== 'RPC_CALL_FAIL') { if ($e->rpc !== 'RPC_CALL_FAIL') {
throw $e; throw $e;
} }
} catch (\danog\MadelineProto\Exception $e) {
} }
$default_params = ['offset' => 0, 'limit' => null, 'timeout' => 0]; $default_params = ['offset' => 0, 'limit' => null, 'timeout' => 0];

View File

@ -42,7 +42,6 @@ try {
} catch (\danog\MadelineProto\Exception $e) { } catch (\danog\MadelineProto\Exception $e) {
var_dump($e->getMessage()); var_dump($e->getMessage());
} }
if (file_exists('.env')) { if (file_exists('.env')) {
echo 'Loading .env...'.PHP_EOL; echo 'Loading .env...'.PHP_EOL;
$dotenv = new Dotenv\Dotenv(getcwd()); $dotenv = new Dotenv\Dotenv(getcwd());
@ -89,6 +88,7 @@ $MadelineProto->session = 'session.madeline';
\danog\MadelineProto\Logger::log(['hey'], \danog\MadelineProto\Logger::WARNING); \danog\MadelineProto\Logger::log(['hey'], \danog\MadelineProto\Logger::WARNING);
\danog\MadelineProto\Logger::log(['hey'], \danog\MadelineProto\Logger::ERROR); \danog\MadelineProto\Logger::log(['hey'], \danog\MadelineProto\Logger::ERROR);
\danog\MadelineProto\Logger::log(['hey'], \danog\MadelineProto\Logger::FATAL_ERROR); \danog\MadelineProto\Logger::log(['hey'], \danog\MadelineProto\Logger::FATAL_ERROR);
//$MadelineProto->phone->createGroupCall(['channel' => -1001333587884
$message = (getenv('TRAVIS_COMMIT') == '') ? 'I iz works always (io laborare sembre) (yo lavorar siempre) (mi labori ĉiam) (я всегда работать) (Ik werkuh altijd) (Ngimbonga ngaso sonke isikhathi ukusebenza)' : ('Travis ci tests in progress: commit '.getenv('TRAVIS_COMMIT').', job '.getenv('TRAVIS_JOB_NUMBER').', PHP version: '.getenv('TRAVIS_PHP_VERSION')); $message = (getenv('TRAVIS_COMMIT') == '') ? 'I iz works always (io laborare sembre) (yo lavorar siempre) (mi labori ĉiam) (я всегда работать) (Ik werkuh altijd) (Ngimbonga ngaso sonke isikhathi ukusebenza)' : ('Travis ci tests in progress: commit '.getenv('TRAVIS_COMMIT').', job '.getenv('TRAVIS_JOB_NUMBER').', PHP version: '.getenv('TRAVIS_PHP_VERSION'));