Apply fixes from StyleCI
This commit is contained in:
parent
1a60d87c3a
commit
5fd727292d
18
magna.php
18
magna.php
@ -229,19 +229,19 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p
|
|||||||
foreach ($this->times_messages as $key => $pair) {
|
foreach ($this->times_messages as $key => $pair) {
|
||||||
list($peer, $time, $message) = $pair;
|
list($peer, $time, $message) = $pair;
|
||||||
if ($time < time()) {
|
if ($time < time()) {
|
||||||
try {
|
try {
|
||||||
$this->messages->sendMessage(['peer' => $peer, 'message' => $message ]);
|
$this->messages->sendMessage(['peer' => $peer, 'message' => $message]);
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) {
|
if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) {
|
||||||
$t = str_replace('FLOOD_WAIT_', '', $e->rpc);
|
$t = str_replace('FLOOD_WAIT_', '', $e->rpc);
|
||||||
$this->times_messages[] = [$peer, time() + 1 + $t, $message];
|
$this->times_messages[] = [$peer, time() + 1 + $t, $message];
|
||||||
}
|
|
||||||
echo $e;
|
|
||||||
}
|
}
|
||||||
|
echo $e;
|
||||||
|
}
|
||||||
unset($this->times_messages[$key]);
|
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) {
|
foreach ($this->calls as $key => $call) {
|
||||||
if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
|
if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
|
||||||
unset($this->calls[$key]);
|
unset($this->calls[$key]);
|
||||||
|
Loading…
Reference in New Issue
Block a user