Fix checkDatabaseEncryptionKey usage in examples.

GitOrigin-RevId: 854debfb6f9ec64bc44a19200fdc2f72e39dc6f1
This commit is contained in:
levlam 2020-03-25 00:59:38 +03:00
parent 8898bfa655
commit 5f5d3355e3
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ while True:
# set an encryption key for database to let know TDLib how to open the database
if auth_state['@type'] == 'authorizationStateWaitEncryptionKey':
td_send({'@type': 'checkDatabaseEncryptionKey', 'key': 'my_key'})
td_send({'@type': 'checkDatabaseEncryptionKey', 'encryption_key': ''})
# enter phone number to log in
if auth_state['@type'] == 'authorizationStateWaitPhoneNumber':

View File

@ -124,7 +124,7 @@ func updateAuthorizationState(authorizationState: Dictionary<String, Any>) {
]);
case "authorizationStateWaitEncryptionKey":
client.queryAsync(query: ["@type":"checkDatabaseEncryptionKey", "key":"cucumber"])
client.queryAsync(query: ["@type":"checkDatabaseEncryptionKey", "encryption_key":""])
case "authorizationStateWaitPhoneNumber":
print("Enter your phone number: ")