Skip to content

Commit

Permalink
Update to version 10.1.3 (layer 165)
Browse files Browse the repository at this point in the history
  • Loading branch information
AsenOsen committed Oct 18, 2023
1 parent cc9e91a commit db77ac3
Show file tree
Hide file tree
Showing 15 changed files with 484,296 additions and 13,058 deletions.
7 changes: 6 additions & 1 deletion src/Client/BasicClient/BasicClientImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace TelegramOSINT\Client\BasicClient;

use TelegramOSINT\Client\AuthKey\AuthKey;
use TelegramOSINT\Client\AuthKey\AuthorizedAuthKey;
use TelegramOSINT\Exception\TGException;
use TelegramOSINT\LibConfig;
use TelegramOSINT\Logger\ClientDebugLogger;
Expand Down Expand Up @@ -126,7 +127,11 @@ public function login(AuthKey $authKey, ?Proxy $proxy, callable $cb): void

private function bumpProtocolVersion(): void
{
$initConnection = new init_connection(AccountInfo::generate(), new get_config());
$accountInfo = $this->authKey instanceof AuthorizedAuthKey ?
AccountInfo::generateFromAuthKey($this->authKey) :
AccountInfo::generate();

$initConnection = new init_connection($accountInfo, new get_config());
$requestWithLayer = new invoke_with_layer(LibConfig::APP_DEFAULT_TL_LAYER_VERSION, $initConnection);
/** @noinspection NullPointerExceptionInspection */
$this->getConnection()->getResponseAsync($requestWithLayer, static function (AnonymousMessage $response) {});
Expand Down
1 change: 0 additions & 1 deletion src/Client/InfoObtainingClient/InfoClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\contacts_resolve_username;
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\contacts_search;
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\export_authorization;
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\get_all_chats;
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\get_common_chats;
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\get_config;
use TelegramOSINT\TLMessage\TLMessage\ClientMessages\get_file;
Expand Down
6 changes: 3 additions & 3 deletions src/LibConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ class LibConfig

public const APP_DEFAULT_DEVICE_LANG_CODE = 'en-us';
public const APP_DEFAULT_LANG_CODE = 'en';
public const APP_DEFAULT_VERSION = '9.6.5';
public const APP_DEFAULT_VERSION = '10.1.3';
// see https://www.apkmirror.com/apk/telegram-fz-llc/telegram/telegram-8-8-0-release/
// universal for android 6+ has 5th digit always "2"
public const APP_DEFAULT_VERSION_CODE = '33562';
public const APP_DEFAULT_VERSION_CODE = '39442';
public const APP_DEFAULT_LANG_PACK = 'android';
// https://schema.horner.tj
public const APP_DEFAULT_TL_LAYER_VERSION = 158;
public const APP_DEFAULT_TL_LAYER_VERSION = 165;

public const ENV_AUTHKEY = 'BOT'; // env variable for authkey path
}
Loading

0 comments on commit db77ac3

Please sign in to comment.