This commit is contained in:
shoopea 2020-02-05 12:31:15 +08:00
parent 007a3f6be4
commit 8126edc677

15
td.go
View File

@ -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)
}