1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-02 15:17:46 +01:00

Compare commits

...

4 Commits

Author SHA1 Message Date
29057d31e7 Release 8.2.1 2024-08-12 11:27:52 +02:00
e650407a8c Bump 2024-08-12 11:20:47 +02:00
7e93cfbfca Add validation 2024-08-07 13:52:10 +02:00
8b12eff78c Bump 2024-08-04 13:41:43 +02:00
7 changed files with 9 additions and 3 deletions

2
docs

@ -1 +1 @@
Subproject commit dacbe8e1208df64465871d24a4ad7c39c52df102
Subproject commit 879b1285dff275cff9c19b1708c859ce541cc400

View File

@ -51,7 +51,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.2.0';
public const RELEASE = '8.2.1';
/**
* We're not logged in.
*

View File

@ -221,6 +221,9 @@ trait FileServer
private static array $checkedScripts = [];
private function checkDownloadScript(string $scriptUrl): void
{
if (!str_starts_with($scriptUrl, 'http://') && !str_starts_with($scriptUrl, 'https://')) {
throw new AssertionError("The download script must be an HTTP (preferrably HTTPS) URL!");
}
if (isset(self::$checkedScripts[$scriptUrl])) {
return;
}

View File

@ -434,6 +434,7 @@ class RPCErrorException extends \Exception
'IMPORT_TOKEN_INVALID' => new self($rpc, 'The specified token is invalid.', $code, $caller, $previous),
'INLINE_RESULT_EXPIRED' => new self($rpc, 'The inline query expired.', $code, $caller, $previous),
'INPUT_CHATLIST_INVALID' => new self($rpc, 'The specified folder is invalid.', $code, $caller, $previous),
'INPUT_FILE_INVALID' => new self($rpc, 'The specified [InputFile](https://core.telegram.org/type/InputFile) is invalid.', $code, $caller, $previous),
'INPUT_FILTER_INVALID' => new self($rpc, 'The specified filter is invalid.', $code, $caller, $previous),
'INPUT_TEXT_EMPTY' => new self($rpc, 'The specified text is empty.', $code, $caller, $previous),
'INPUT_TEXT_TOO_LONG' => new self($rpc, 'The specified text is too long.', $code, $caller, $previous),

File diff suppressed because one or more lines are too long

View File

@ -114,6 +114,7 @@ foreach (['methods', 'constructors'] as $type) {
$bot = new \danog\MadelineProto\API('testing.madeline');
$bot->start();
echo $res."\n\n";
foreach (explode("\n\n", $res) as $chunk) {
if (!$chunk || !trim(explode(':', $chunk)[1])) {
continue;

View File

@ -64,6 +64,7 @@ foreach ($layer['methods']->by_id as $constructor) {
|| $name === 'auth.dropTempAuthKeys'
|| $name === 'account.resetAuthorization'
|| $name === 'account.resetPassword'
|| $name === 'account.updateUsername'
|| !str_contains($name, '.')) {
continue;
}