From 8c9cd420122e6458331fe3c442801a19aab7830a Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 13 Dec 2019 15:32:04 +0800 Subject: [PATCH] test SetOption(online) --- main.go | 5 +++++ td.go | 1 + 2 files changed, 6 insertions(+) diff --git a/main.go b/main.go index c33d968..a662857 100644 --- a/main.go +++ b/main.go @@ -136,6 +136,11 @@ func main() { go ListenTG(client) go ListenMQ(client, MQTGCmdQueue) go ListenMe(client) + + opt := td.OptionValueBoolean + opt.Value := false + _, err := client.SetOption("online", opt) + logOnError(err, "SetOption(online)") fmt.Println("Started !") diff --git a/td.go b/td.go index cb98715..2359159 100644 --- a/td.go +++ b/td.go @@ -298,4 +298,5 @@ func clientMsg(c *tdlib.Client, m TGCommand) { default: log.Printf("ListenMQ : No handler for command %d.\n", m.Type) } + }