From daaed61f544ea37923af58c2d83acb9a90d04097 Mon Sep 17 00:00:00 2001 From: AYMENJD <53928879+AYMENJD@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:29:42 +0300 Subject: [PATCH] Create client ID after configuring log settings. --- internal/tdjson/tdjson.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/tdjson/tdjson.go b/internal/tdjson/tdjson.go index cbc78a6..eac294e 100644 --- a/internal/tdjson/tdjson.go +++ b/internal/tdjson/tdjson.go @@ -16,7 +16,6 @@ func NewTdJson(create_client bool, verbosity int, log_file string) *TdJson { instance := TdJson{} if create_client { - instance.ClientID = C.td_create_client_id() if log_file != "" { instance.Execute(utils.UnsafeMarshal( utils.MakeObject( @@ -40,6 +39,8 @@ func NewTdJson(create_client bool, verbosity int, log_file string) *TdJson { }, ), )) + + instance.ClientID = C.td_create_client_id() } return &instance