Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-03-30 10:54:16 +00:00 committed by StyleCI Bot
parent 1a60d87c3a
commit 5fd727292d

View File

@ -229,19 +229,19 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p
foreach ($this->times_messages as $key => $pair) {
list($peer, $time, $message) = $pair;
if ($time < time()) {
try {
$this->messages->sendMessage(['peer' => $peer, 'message' => $message ]);
} catch (\danog\MadelineProto\RPCErrorException $e) {
if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) {
$t = str_replace('FLOOD_WAIT_', '', $e->rpc);
$this->times_messages[] = [$peer, time() + 1 + $t, $message];
}
echo $e;
try {
$this->messages->sendMessage(['peer' => $peer, 'message' => $message]);
} catch (\danog\MadelineProto\RPCErrorException $e) {
if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) {
$t = str_replace('FLOOD_WAIT_', '', $e->rpc);
$this->times_messages[] = [$peer, time() + 1 + $t, $message];
}
echo $e;
}
unset($this->times_messages[$key]);
}
}
\danog\MadelineProto\Logger::log(count($this->calls)." calls running!");
\danog\MadelineProto\Logger::log(count($this->calls).' calls running!');
foreach ($this->calls as $key => $call) {
if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
unset($this->calls[$key]);