mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 07:51:13 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
96efd18e13
commit
2f8149c4d9
3
id.php
3
id.php
@ -12,7 +12,7 @@ If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
$id = ['AgADBAADcKoxG4_aCgYKET2oLMua7pxRaRkABKoeLWY9bpazGdcCAAEC', "BQADBAADhQEAAo_aCgZOb3LWhOazMQI"];
|
$id = ['AgADBAADcKoxG4_aCgYKET2oLMua7pxRaRkABKoeLWY9bpazGdcCAAEC', 'BQADBAADhQEAAo_aCgZOb3LWhOazMQI'];
|
||||||
|
|
||||||
function foreach_offset_length($string)
|
function foreach_offset_length($string)
|
||||||
{
|
{
|
||||||
@ -25,6 +25,7 @@ function foreach_offset_length($string)
|
|||||||
$res[] = ['number' => $number, 'offset' => $offset, 'length' => $length];
|
$res[] = ['number' => $number, 'offset' => $offset, 'length' => $length];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
$res = [];
|
$res = [];
|
||||||
|
@ -42,7 +42,6 @@ trait CallHandler
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$server_answer = $this->datacenter->incoming_messages[$this->datacenter->outgoing_messages[$int_message_id]['response']]['content']; // continue was not called, so I got a response
|
$server_answer = $this->datacenter->incoming_messages[$this->datacenter->outgoing_messages[$int_message_id]['response']]['content']; // continue was not called, so I got a response
|
||||||
|
|
||||||
} catch (\danog\MadelineProto\Exception $e) {
|
} catch (\danog\MadelineProto\Exception $e) {
|
||||||
\danog\MadelineProto\Logger::log('An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...');
|
\danog\MadelineProto\Logger::log('An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...');
|
||||||
continue;
|
continue;
|
||||||
|
@ -194,6 +194,7 @@ trait UpdateHandler
|
|||||||
\danog\MadelineProto\Logger::log('Got channel too long update, getting difference...');
|
\danog\MadelineProto\Logger::log('Got channel too long update, getting difference...');
|
||||||
if (!isset($this->channels_state[$channel_id]) && !isset($update['pts'])) {
|
if (!isset($this->channels_state[$channel_id]) && !isset($update['pts'])) {
|
||||||
\danog\MadelineProto\Logger::log('I do not have the channel in the states and the pts is not set.');
|
\danog\MadelineProto\Logger::log('I do not have the channel in the states and the pts is not set.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -80,5 +80,4 @@ var_dump($MadelineProto->API->get_updates());
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
$sentMessage = $MadelineProto->messages->sendMessage(['peer' => '@pwrtelegramgroupita', 'message' => $message, 'entities' => [['_' => 'inputMessageEntityMentionName', 'offset' => 0, 'length' => strlen($message), 'user_id' => $mention]]]);
|
$sentMessage = $MadelineProto->messages->sendMessage(['peer' => '@pwrtelegramgroupita', 'message' => $message, 'entities' => [['_' => 'inputMessageEntityMentionName', 'offset' => 0, 'length' => strlen($message), 'user_id' => $mention]]]);
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user