Apply fixes from StyleCI
This commit is contained in:
parent
f0939e3725
commit
c0e4afc646
@ -129,7 +129,7 @@ $MadelineProto->get_updates(['offset' => -1]);
|
|||||||
if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
|
if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
|
||||||
unset($calls[$key]);
|
unset($calls[$key]);
|
||||||
} elseif (isset($times[$call->getOtherID()]) && $times[$call->getOtherID()][0] < time()) {
|
} elseif (isset($times[$call->getOtherID()]) && $times[$call->getOtherID()][0] < time()) {
|
||||||
$times[$call->getOtherID()][0] += 30+count($calls);
|
$times[$call->getOtherID()][0] += 30 + count($calls);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$MadelineProto->messages->editMessage(['id' => $times[$call->getOtherID()][1], 'peer' => $call->getOtherID(), 'message' => 'Total running calls: '.count($calls).PHP_EOL.PHP_EOL.$call->getDebugString()]);
|
$MadelineProto->messages->editMessage(['id' => $times[$call->getOtherID()][1], 'peer' => $call->getOtherID(), 'message' => 'Total running calls: '.count($calls).PHP_EOL.PHP_EOL.$call->getDebugString()]);
|
||||||
|
@ -578,10 +578,13 @@ trait PeerHandler
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$res = $this->method_call('contacts.resolveUsername', ['username' => str_replace('@', '', $username)], ['datacenter' => $this->datacenter->curdc]);
|
$res = $this->method_call('contacts.resolveUsername', ['username' => str_replace('@', '', $username)], ['datacenter' => $this->datacenter->curdc]);
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) { return false; }
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ($res['_'] === 'contacts.resolvedPeer') {
|
if ($res['_'] === 'contacts.resolvedPeer') {
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user