Set database directory in examples.
GitOrigin-RevId: bbbd31f3a7f044cf12db36bbce21363ee6019cde
This commit is contained in:
parent
751029d45d
commit
4ebb813907
@ -273,6 +273,7 @@ class TdExample {
|
||||
},
|
||||
[this](td_api::authorizationStateWaitTdlibParameters &) {
|
||||
auto parameters = td_api::make_object<td_api::tdlibParameters>();
|
||||
parameters->database_directory_ = "tdlib";
|
||||
parameters->use_message_database_ = true;
|
||||
parameters->use_secret_chats_ = true;
|
||||
parameters->api_id_ = 94575;
|
||||
|
@ -83,6 +83,7 @@ public final class Example {
|
||||
switch (Example.authorizationState.getConstructor()) {
|
||||
case TdApi.AuthorizationStateWaitTdlibParameters.CONSTRUCTOR:
|
||||
TdApi.TdlibParameters parameters = new TdApi.TdlibParameters();
|
||||
parameters.databaseDirectory = "tdlib";
|
||||
parameters.useMessageDatabase = true;
|
||||
parameters.useSecretChats = true;
|
||||
parameters.apiId = 94575;
|
||||
@ -265,7 +266,7 @@ public final class Example {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// disable TDLib log
|
||||
Log.setVerbosityLevel(0);
|
||||
if (!Log.setFilePath("log")) {
|
||||
if (!Log.setFilePath("tdlib.log")) {
|
||||
throw new IOError(new IOException("Write access to the current directory is required"));
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,7 @@ func updateAuthorizationState(authState: Dictionary<String, Any>) {
|
||||
client.queryAsync(query:[
|
||||
"@type":"setTdlibParameters",
|
||||
"parameters":[
|
||||
"database_directory":"tdlib",
|
||||
"use_message_database":true,
|
||||
"use_secret_chats":true,
|
||||
"api_id":94575,
|
||||
|
Loading…
Reference in New Issue
Block a user