From 8126edc677721cdeb69a6be5fa40246a9698e595 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 5 Feb 2020 12:31:15 +0800 Subject: [PATCH] test --- td.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/td.go b/td.go index 39c9926..14727ba 100644 --- a/td.go +++ b/td.go @@ -296,12 +296,15 @@ func clientMsg(c *tdlib.Client, m TGCommand) { MQCWMsgQueue <- r } case commandCallback: - p := tdlib.CallbackQueryPayload{} - d := p.(tdlib.CallbackQueryPayloadData) - a, err := c.GetCallbackQueryAnswer(m.FromChatID64, m.FromMsgID64, p) - logOnError(err, "clientMsg : GetCallbackQueryAnswer") - b, _ := json.Marshal(a) - log.Printf("GetCallbackQueryAnswer :\n%s\n", string(b)) + p := tdlib.NewCallbackQueryPayloadData(m.CallbackData) + b, _ := json.Marshal(p) + log.Printf("CallbackQueryPayloadData :\n%s\n", string(b)) + /* + a, err := c.GetCallbackQueryAnswer(m.FromChatID64, m.FromMsgID64, p) + logOnError(err, "clientMsg : GetCallbackQueryAnswer") + b, _ := json.Marshal(a) + log.Printf("GetCallbackQueryAnswer :\n%s\n", string(b)) + */ default: log.Printf("clientMsg : No handler for command %d.\n", m.Type) }