diff --git a/tdlib.example.jsonc b/tdlib.example.jsonc index 275bd64..0df1666 100644 --- a/tdlib.example.jsonc +++ b/tdlib.example.jsonc @@ -2,7 +2,8 @@ "TdlibParameters": { // Detailed information is availabled on https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1tdlib_parameters.html "api_id": 12345678, // Application identifier for Telegram API access, which can be obtained at https://my.telegram.org. "api_hash": "1234567890abcdef0123456789abcdef", // Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org. - "database_directory": "/path/to/database" // Optional. The path to the directory for the persistent database; if empty, the current working directory will be used. + "database_directory": "/path/to/database", // Optional. The path to the directory for the persistent database; if empty, the current working directory will be used. + "use_message_database": false // Optional. If set to true, the library will maintain a cache of chats and messages. Warn: TdLib do not provide a function to optimize database. }, "encryption_key": "Base64 encoded's key", // Encryption key to check or set up. Need base64 encoded. "proxy": { // Optional. Specify proxy diff --git a/tdlib.py b/tdlib.py index 6060642..f54dc81 100644 --- a/tdlib.py +++ b/tdlib.py @@ -391,7 +391,7 @@ class TdLib: if extra in self._re: re = self._re.pop(extra) return re - await asyncio.sleep(0.1) + await asyncio.sleep(0.01) def _update(self): result: bytes = _td_json_client_receive(self._client_id, 1.0) @@ -695,7 +695,7 @@ class TdLib: re = await self.receive('updateAuthorizationState') state = re['authorization_state'] if state['@type'] == 'authorizationStateWaitTdlibParameters': - pa = {"use_message_database": True, + pa = {"use_message_database": False, "system_language_code": "en", "device_model": "Desktop", "application_version": "1.0.0",