test SetOption(online)

This commit is contained in:
shoopea 2019-12-13 15:32:04 +08:00
parent 9406962dd1
commit 8c9cd42012
2 changed files with 6 additions and 0 deletions

View File

@ -137,6 +137,11 @@ func main() {
go ListenMQ(client, MQTGCmdQueue) go ListenMQ(client, MQTGCmdQueue)
go ListenMe(client) go ListenMe(client)
opt := td.OptionValueBoolean
opt.Value := false
_, err := client.SetOption("online", opt)
logOnError(err, "SetOption(online)")
fmt.Println("Started !") fmt.Println("Started !")
// Main loop // Main loop

1
td.go
View File

@ -298,4 +298,5 @@ func clientMsg(c *tdlib.Client, m TGCommand) {
default: default:
log.Printf("ListenMQ : No handler for command %d.\n", m.Type) log.Printf("ListenMQ : No handler for command %d.\n", m.Type)
} }
} }